Aiden
11-07-2002, 02:16 AM
Okay,
Got a pop-up script. There are multiple pop-ups to be generated on the one page and I'm using the one function in the HEAD which receives the target HTML and a few other variables and generates the pop-up.
Problem is that if you click for one pop-up and try to launch another one - the second one replaces the first in its window. I can't get my head around why! - I want to be able to click and generate multiple pop-ups. Help would be greatly appreciated.
Got this code in the HEAD:
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
function WinOpen(URL, windowName, windowWidth, windowHeight) {
var xposition = 400;
var yposition = 300;
if ((parseInt(navigator.appVersion) >= 4 )) {
xposition = (screen.width - windowWidth) / 2;
yposition = (screen.height - windowHeight) / 2;
}
var args = "width=" + windowWidth + ","
+ "height=" + windowHeight + ","
+ "location=0,"
+ "menubar=0,"
+ "status=0,"
+ "titlebar=0,"
+ "hotkeys=0,"
+ "scrollbars=yes,"
+ "screenx=" + xposition + "," // NN Only
+ "screeny=" + yposition + "," // NN Only
+ "left=" + xposition + "," // IE Only
+ "top=" + yposition; // IE Only
windo=window.open(URL, windowName, args);
if (windo) {
windo.focus();
}
}
</SCRIPT>
Got this code in multiple places in BODY:
<A HREF="javascript:WinOpen('wherever.html', 'Wherever', 600, 320);">Pop-up Links To Wherever</A>
<P>
<A HREF="javascript:WinOpen('whatever.html', 'Whatever', 600, 320);">Pop-up Links To Whatever</A>
:confused: Cheers.
Got a pop-up script. There are multiple pop-ups to be generated on the one page and I'm using the one function in the HEAD which receives the target HTML and a few other variables and generates the pop-up.
Problem is that if you click for one pop-up and try to launch another one - the second one replaces the first in its window. I can't get my head around why! - I want to be able to click and generate multiple pop-ups. Help would be greatly appreciated.
Got this code in the HEAD:
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
function WinOpen(URL, windowName, windowWidth, windowHeight) {
var xposition = 400;
var yposition = 300;
if ((parseInt(navigator.appVersion) >= 4 )) {
xposition = (screen.width - windowWidth) / 2;
yposition = (screen.height - windowHeight) / 2;
}
var args = "width=" + windowWidth + ","
+ "height=" + windowHeight + ","
+ "location=0,"
+ "menubar=0,"
+ "status=0,"
+ "titlebar=0,"
+ "hotkeys=0,"
+ "scrollbars=yes,"
+ "screenx=" + xposition + "," // NN Only
+ "screeny=" + yposition + "," // NN Only
+ "left=" + xposition + "," // IE Only
+ "top=" + yposition; // IE Only
windo=window.open(URL, windowName, args);
if (windo) {
windo.focus();
}
}
</SCRIPT>
Got this code in multiple places in BODY:
<A HREF="javascript:WinOpen('wherever.html', 'Wherever', 600, 320);">Pop-up Links To Wherever</A>
<P>
<A HREF="javascript:WinOpen('whatever.html', 'Whatever', 600, 320);">Pop-up Links To Whatever</A>
:confused: Cheers.