Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening variable frameset in PopUp window.

Status
Not open for further replies.

activethistle

Technical User
Apr 3, 2001
95
GB
OK tricky one this...

I want to dynamically change the contents of two frames in a popup window.

I know that

Code:
myWin.document.write()
writes to the popup
and
Code:
upperframe.document.write()
writes to a frame within the page that the script's on.

But how do you write to individual frames in a remote window?

Most grateful for any assistance.

Active
 
If your script opened a window by using something like
window.open(...)
than you need to save to some variable window object that this method returns:

popupwin = window.open(...)

and than you can use something like

popupwin.topframe....
popupwin.frames[0]....
popupwin.frames['topframe']....

and so on.

If you opening window by <a target=&quot;_blank&quot;> than you need to revert to above scheme.

BTW: You should know that opening new windows can be restricted in most modern browsers and most users do this.
So you can rely on ability to open new windows only in local or intranet applications where client setup is under your control.
Michael Dubner
Brainbench MVP/HTML+JavaScript

 
Thanks for your answer - How do you prevent MSIE from opening new windows?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top