rendered paste body<html>
<head>
<script type="text/javascript">
myObject = new function(){
this.myString = "outside scope of myMethod";
this.myMethod = function(){
myObject.myMethod.myString = "inside scope of myMethod";
alert(this.myString);
}
}
function anotherObject(){
this.myString = "outside scope of anotherObject";
this.myMethod = function(){
try{
anotherObject.myMethod.myString = "inside scope of myMethod";
} catch (ex){
alert(ex);
}
alert(this.myString);
}
}
myObject.myMethod();
yetAnotherObject = new anotherObject();
yetAnotherObject.myMethod();
</script>
</head>
<body>
</body>
</html>