• Welcome to DNForum.com - Domain Investor Forum, Free Domain Marketplace and a community for 45+ domain pros
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

Javascript Help...?

Status
Not open for further replies.

GT Web

DNF Addict
The Originals
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
 
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 :-)
 
IT Web Team got it all sorted out for me...thanks :-)
 
Status
Not open for further replies.
Back
Top Bottom