I have an scenario where in I have a page, which have tag and some global javascript variables within that. I also have an iframe within that pag
Easily by calling parent.your_var_name in your iframe's script.
One condition: both pages (main and iframe's) have to be on the same domain.
main page:
iframe