I am still not clear about how to reference an object within another
object to pass first object to a function:
var Parent = {
myFunc : function(){
alert("Parent = "+this)
},
Child : {
//how to get reference to Parent?
myChildFunc : function(){
alert("Parent IS NOT "+this);
this.myFunc(); //error -this.myFunc is not a function
}
},
}
window.onload = Parent.Child.my ChildFunc;
object to pass first object to a function:
var Parent = {
myFunc : function(){
alert("Parent = "+this)
},
Child : {
//how to get reference to Parent?
myChildFunc : function(){
alert("Parent IS NOT "+this);
this.myFunc(); //error -this.myFunc is not a function
}
},
}
window.onload = Parent.Child.my ChildFunc;
Comment