I’ve a pop up window which i’m opening using below script. On every click, i want to open new pop up.
I understand, having unique name for the window will solve the problem (In this case “SampleWindow”).
What’s the best way to maintain the uniqueness of the window ? Is there any other way to manage javascript popup ?
window.open(url, 'SampleWindow', 'WIDTH=300,HEIGHT=250');
Passing a value of
_blankto thenameparameter will load the passedURLinto a new window. Like this:Other options for
nameparameter (optional) include:_blank– URL is loaded into a new window. This is default_parent– URL is loaded into the parent frame_self– URL replaces the current page_top– URL replaces any framesets that may be loadedname– The name of the windowDo note that if you’ll be passing this JavaScript to an anchor tag
Athat IE browsers expect a return value, otherwise it’ll referrence theAtag itself. Your code for that would look like:or better (to avoid showing users your code in the status bar):
Links: