Accessing Frames in a Popup Window in JavaScript

For various reasons, it is hard to access a (frameset) frame in a popup window that you just opened. So what you want to do is store information in the popup window and let it perform whatever action needed itself:

Parent window:

popup = window.open(url,name,options);
popup.parameters = ...

Popup window:

<frameset onload="performAction(top.parameters)">
  <frame ...>
</frameset>

If you actually need to access a frame, you should do it the same way. I.e. put the actual functionality in the frame window:

<body onload="performFrameAction(window.frameParameters)">
...
</body>
 
framesinpopups.txt · Last modified: 2009/01/18 12:49 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki