Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Daily Diamond

Javascript Help...?

Status
Not open for further replies.

GT Web

DNF Addict
Legacy Exclusive Member
Joined
Feb 21, 2003
Messages
6,459
Reaction score
3
Hi,

I already have one pop up on a page and I want to put another one in the same page (so I have two loading at the same time). This is a bit of a unique project, so please dont start telling me why I shouldnt be putting 2 pop ups on the same page.


The code for one pop up is:


in the <head> section:

onLoad="popupPage()"



and then in the <body> section:

<script language="javascript">
<!-- Begin
function popupPage() {
var page = "http://www.urlexample1";
windowprops = "height=600,width=800,location=yes,"
+ "scrollbars=yes,menubars=yes,toolbars=yes,resizable=yes";
output = window.open(page, "popup", windowprops);
}

// End -->
</script>



How would I add on that same code again (but obviously with a different URL) so both will pop up when the page loads?

Thanks
 

Bender

Bending
Legacy Exclusive Member
Joined
Apr 16, 2004
Messages
1,737
Reaction score
0
Code:
<body onload="popupPage();">
<script language="javascript">
<!-- Begin
function popupPage() {
var page = "http://www.google.com";
var page1 = "http://www.yahoo.com";
windowprops = "height=600,width=800,location=yes,"
+ "scrollbars=yes,menubars=yes,toolbars=yes,resizable =yes"; 
window.open(page, "popup", windowprops);
window.open(page1, "popup2", windowprops);
}
</script>
For the record, I hate popups :)
 

GT Web

DNF Addict
Legacy Exclusive Member
Joined
Feb 21, 2003
Messages
6,459
Reaction score
3
IT Web Team got it all sorted out for me...thanks :)
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

Premium Members

MariaBuy

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom