How to define javascript variable from within a iframe -
i have iframe needs change global variable in parent page.
i tried
parent.myvar = "myvalue"; parent.myfunction(); however, it's not working me. function executes variable remains unchanged.
edit: both iframe , parent in same domain.
there nothing wrong code : https://stackoverflow.com/a/1301645/390330
// set global variable 'foo' in parent global scope parent.foo = 'bar';
Comments
Post a Comment