I have a method inside of a MooTools class that I want to access after uploading a file with AJAX (iFrame). The Javascript that the iFrame page runs when it loads should call the method of the Class, but I am unable to access it using anything like: Class name: Main var class was initialized in: myMain
parent.window.myMain.myMethod parent.window.Main.myMethod
Is this even possible? If it is how do I do this?
The syntax I prefer:
var MyClass = new Class({
/* list regular non-static methods her as usual */
});
MyClass.staticMethod = function()
{
/* body of static function */
};
The advantages you have are:
MyClass.staticMethod()
inside and outside of your classTo access the static method in an inner frame use can window.parent.MyClass.staticMethod();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With