I have a javascript like the following on my main page: It just defines a variable
test1 = function(){
var bla= "bla";
}
In my iFrame, I have another javascript which only produces an alert like the following
alert(parent.test1.bl);
Unfortunately, the alert window appears but the content says "undefined". How can I read a variable from within a function in the parent window?
The funny part is that if I execute the alert at the parent window and call only the function from within the iFrame, the alert box pops up and the message is included. But it seems that it is not possible to read a variable from the parent.
parent.window.variable?