I'm trying to control one window from another in HTML5. I'd like it so when I open one window that I log into, and another window that I login to, then from one window I can click a button and something happens in the other window. I'm not sure where to start; can somebody point me in the right direction?
You don't need any HTML5-Features for that but you can easily do it with javascript:
myNewWindow = window.open()
opens a new window and assigns a window
-object of that new window to myNewWindow
, so you can easily access the new window's DOM from the opening script, using the myNewWindow
-variable.
It also works the other way: In a script in the new window, you can user window.opener
to access the window
-object and DOM of the opening window.
Just make sure, that the content of all your windows is loaded from same domain, as javascript does not allow you to control content loaded from another source (refer to "same origin policy" for more information on this topic).