I have a hyper-link in my php page which opens in new window when it is clicked. But I want it should open only in one window at time, it should ne open if it is already open in new window of browser. Suppose If I click 5 times it is opening in 5 new windows, I want it only in one window. This problem is coming with Mozilla Firefox Please help me doing this with JavaScript or Jquery. Thanks thanks. and sorry to share incomplete information. Actually multiple links will be created through php code, which will be opened in different windows. I have used JavaScript to open them in different window. My problem is that same url should not open again if it is already open in window or if any url is clicked multiple times it should open only one window. Here is my code : PHP Code
<?php
$Class="class='links'"; $jsfun = 'javascript:openMyLink';
while(condition) { print "Click Here";
} ?>
JS code :
function openMyLink(arg1,arg2,arg3) { var url = "http:///launcher.php?arg1="+arg1+"&arg2="+arg2+"&arg3="+arg3; newwindow = window.open(url, "Mywindow",'height=596, width=795, left=0, top=0, resizable=yes, scrollbars=no, toolbar=no, menubar=no'); }I tried to change the second parameter of window.open as dynamic also instead of "Mywindow" but it did not work too. Its not giving the issue with chrome or IE.
window.open
, set the second parameter as a specific value, like "a1", and it should only allow one "instance" of the window open at a time. – Ian