I am having a web page which contain four links, each link open a popup window. I am using a common JavaScript function to open popup window, as given below
I think what you want for 1 and 2 is:
if(!targetWin) { var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=Yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } targetWin.focus();