Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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
 

Bender

Bending
The Originals
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
The Originals
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.
Top Bottom