I have an iframe with that needs to change a global variable in the parent page.
I tried
parent.myvar = "myvalue";
parent.myfunction();
However, it's not working for me. The function executes but the variable remains unchanged.
EDIT: both the iframe and the parent are in the same domain.