javascript - Can I change a value in parent page's JS from iframe's JS? -
I have a page with 3 iframes and this page loads JS files containing
Var stayFifty = new boolean (wrong);
And this function, which changes on the basis of this boolean
On this page, I have an onclick function defined in an iframe
toggle = function () {parent.stayFifty = new boolean (! (StayFifty.valueOf () )); }; Added to an IMG tag with
onclick = "toggleFifty ();"
But when I click on the IMG tag, the togglefactory function does not seem to be in the fire. I believe that something to do with this is how the togglefactive function is trying to remain frozen. Fuzzy Variables Can anyone explain how to fix this issue and a little bit about the scope of the scope?
I tried to use the information from it but it seems that I do not understand anything.
When you change the value of the stayFifty
variable, then the original < / Code> Do not Remember
Toggle = Function () {parent.stayFifty =! Parent.stayFifty; };
BTW, note that you do not need to use Boolean constructor while working with Boolean variables, and when you declare that you can use it:
/ / stay on your parent's pageFifty = false;
Comments
Post a Comment