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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup window that can open another popup? 2

Status
Not open for further replies.

JennyW

Technical User
Mar 1, 2001
323
0
0
CA
Hi.

Is it possible to have a popup window open another popup window?

Thanks :)
Jenny
 
Hi,

Yes you can.

In your first page use:
<SCRIPT LANGUAGE=&quot;Javascript&quot;>
window.open(&quot;page.html&quot;,&quot;Alert&quot;,&quot;toolbar=no,location=no,directories=no,status=no,&quot; + &quot;menubar=no,scrollbars=no,resizable=no,&quot; + &quot;width=#,height=#,screenX=#,screenY=#&quot;)
// End-->
</SCRIPT>

You can change that to a function if you want.

Then in your popup window put the same code:

<SCRIPT LANGUAGE=&quot;Javascript&quot;>
window.open(&quot;differentpage.html&quot;,&quot;Alert&quot;,&quot;toolbar=no,location=no,directories=no,status=no,&quot; + &quot;menubar=no,scrollbars=no,resizable=no,&quot; + &quot;width=#,height=#,screenX=#,screenY=#&quot;)
// End-->
</SCRIPT>

And call it however you want. If you want the popup to open the second one automatically then just put that code in as is. If you want to call the second popup with a button or link or whatever then you will have to turn that code into a function.

Hope this helps!
NATE
spyderix.gif

design@spyderix-designz.com
 
You mean a new window--window.open--or a popup, popup--window.createPopup?
If it is a new window, you can just use window.open in the new window. View my tutorial here for stuff all about new windows and window.open:

FAQ215-2087

Otherwise, you can put the script for the popup that was already used in the new popup(call it something else if you are using a variable name). I know you CAN'T open two popups from the same window so I'm not sure if it will work or not, but you can try it.
 
LOL I wondered why you didn't reference anything I said.

BTW - I have seen one command open 2 seperate popups before. Can't remember where though. But I remember it was at a tutorial site and they showed how to do it. Wish I could find it.

Later! NATE
spyderix.gif

design@spyderix-designz.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top