• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

JavaScript Help

308holes

New Member
Hello i have this script that i want to use for more then one pop up on one page but it only is setup for 1 now can some one help me get it so i can open as many popup with dif address ?
Code:
<script>
function openIT() {

	theURL= "index.html"
	wname ="CHROMELESSWIN"
	W=400;
	H=200;
	windowCERRARa 		= "../img/close_a.gif"
	windowCERRARd 		= "../img/close_d.gif"
	windowCERRARo 		= "../img/close_o.gif"
	windowNONEgrf 		= "../img/none.gif"
	windowCLOCK		= "../img/clock.gif"
	windowREALtit		= "  Task title"
	windowTIT 	    	= "<font face=verdana size=1>  Window title</font>"
	windowBORDERCOLOR   	= "#000000"
	windowBORDERCOLORsel	= "#999999"
	windowTITBGCOLOR    	= "#0066CC"
	windowTITBGCOLORsel 	= "#00BBFF"
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>

<A HREF="java script:openIT();">Open</A>
 
May I ask why you would want more than one popup. You risk losing valuable visitors to your site if you spawn multiple popups. I would hit control alt del very quick smart.

Please think about it strongly before you go ahead with it. :cry2:
 
It not like the normal popup it for images the user click the link the and the image popus up in the popup but i can get it to open more then one filename or webpage
 
Code:
<html>
<head>

<script language=javascript>
function openwindow() 
{
window.open("http://www.blah.com/")
window.open("http://www.blahblah.com/")
}
</script>

</head>
<body>
<form>
<input type=button value="Open Windows" onclick="openwindow()">
</form>
</body>
</html>

- Aquatix :)
 
By removing the URL from the function and pass it on from the link instead.

Example:
function openIT(meow)
{
yadda = window.open(meow, "", "")
}


<a href="http://www.google.com" onclick="openIT(this.href);return false">open</a>

This way you also avoid feucking it up for ppl with javascript off. Javascript URLs are evil. :devious2:
 
Last edited:
Back
Top