...

View Full Version : Open link in new popup, not existing popup



Jungle_Roger
01-19-2006, 10:16 AM
Hi, Can anyone help me,

When I click a link on my site a popup opens but when I click another link it opens in the same popup window.

how do I get it to open a new popup window for every link?

Here's the code I'm using:

menu.subMenus[2].addItem("Mp3z","window.open('music/mp3z.html','popup','width=300,height=300')");

it is part of a large js menu.

Thanks

Bill Posters
01-19-2006, 10:40 AM
menu.subMenus[2].addItem("Mp3z","window.open('music/mp3z.html','_blank','width=300,height=300')");

Right, glenngv? ;)

glenngv
01-19-2006, 11:03 AM
Using "_blank" will always open the link in new window even if that link is already open. If you want to open each link in its own popup window, use different window target for each link.

menu.subMenus[2].addItem("Mp3z","window.open('music/mp3z.html','menu1','width=300,height=300').focus();");
menu.subMenus[3].addItem("Mp3z2","window.open('music/mp3z2.html','menu2','width=300,height=300').focus();");
...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum