Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up windows

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
US
Maybe this belongs on the javascript forum, but I imagine the solution is pretty simple.

Here's the problem - I have a link that opens up a pop-up window. The new window also contains a link to a second pop-up window. I want both windows to display at the same time.

I use a simple makeNewWindow() function for the first and a makeNewWindow2() function for the second window. The javascript is nearly identical, only the function name (and positioning) change. This works perfectly in IE, but in Netscape 4.7, the second window closes the first.

Is there a Netscape work-around for this?

Here's are the functions:


<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function makeNewWindow(professorsFolder) {
var newWindow

if (!newWindow || newWindow.closed) {
newWindow = window.open(&quot;
if (!newWindow.opener) {
newWindow.opener = window
}

newWindow.moveTo(135,70)
newWindow.document.close() // close layout stream
} else { // window's already open, bring to front
newWindow.focus()
}
}
</script>


<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function makeNewWindow2(professorsFolder) {
var newWindow

if (!newWindow || newWindow.closed) {
newWindow = window.open(&quot;
if (!newWindow.opener) {
newWindow.opener = window
}

newWindow.moveTo(145,90)
newWindow.document.close() // close layout stream
} else { // window's already open, bring to front
newWindow.focus()
}
}
</script>
 
Thanks for your reply!

Although, today this worked in Netscape even though I didn't change anything! (except to re-boot).

Good Old Netscape.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top