Mouseover Creates New Window

[Total: 0    Average: 0/5]

This example shows how to have a mouse over open up a window.

Head Code:

var win= null;
function NewWindow(mypage,myname,w,h){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl;,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.focus();}

Body Code:

<a href="#" 
onmouseover="NewWindow('', 'PopUp','500','500');return true" 
onmouseout="win.close(); return true;"><img src="" border=0 width="100" height="105">

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *