PDA

View Full Version : more than 1 pop-up window at once


fluid01
04-23-2003, 07:53 PM
hello,
could someone please help me? i am trting to create a littl eonlione phot gallery of "before" and "after" photos.... the code i am using :


<a href="images/comp/addisonB.jpg"
ONCLICK="window.open('images/comp/addisonB.jpg', 'popup', 'width=630,height=485,resizable=yes,scrollbars=yes'); return false">
<img src="images/comp/addisonBTH.jpg" border=0>
</a>


makes a window pop-up, but i can only have one window open at a time.... is there a way to make 2 or more windows (the before and after photos) stay open at the same time?

if someone could offer me some help I would really appreciate that... thanks!

Joseph McGarvey
04-23-2003, 08:47 PM
Define names for each window...

This is a script I use alot.. it alows youto center the window in the screen, or you can modify "winl" and "wint" so you could put your windows next to eachother.

<!-- Begin Popup Centerer
function openwin(url, windowname, w, h, scroll, resize) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'status=yes,height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+re size+''
win = window.open(url, windowname, winprops);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->


<body onload="openwin('before.htm','BEFORE', '500', '320', 'no', 'yes'); openwin('after.htm','AFTER', '500', '320', 'no', 'yes');">

Joseph McGarvey
04-23-2003, 08:49 PM
"popup" was hard-coded as your window name, so the second call was loading the "after" into the same window...