Hi John.
Thanks for link to explain my question.
Since you answered this post I have another question for you.
Quiet a while ago you helped me with popup windows which then I needed to open Flash content.
Now I'm using just a very simple popup script which I understand is in fact only to open images but I use this script to open url's.
Everything is working except the close automatically if clicked somewhere I can't add to this script.
Could you please have a look and tell me what to add so the popup will close if clicked somewhere on the screen.
Thanks in advance.
Cheng.
Link that opens the popup window:
Code:
<p><a href="Images/PopUps/popup.html" onclick="NewWindow(this.href,'popup','349','500','no','center');return false" onfocus="this.blur()"><img src="Images/popup_image.jpg" alt="PopUp" width="100" height="149" border="0" /></a></p>
Here the javascript:
Code:
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}
Bookmarks