Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: window.open()


Message #1 by aoadeyemo@h... on Fri, 15 Jun 2001 12:25:31
Hi all, I have possted this message b/4 and Alex Sheil was kind enough to 
give me some ideas, but i still have problems with open a new window in a 
relative position to my image icon on the old window. I've managed to use 
the mouse event to position the left, top coordinates, but when the user 
changes their screen sise my poup is all over the place.
Sample code:

<script>
function windowopener(page){
 var mouseX = (window.event.x) + 215;
 var mouseY = (window.event.y) + 260;
	
  cal = window.open
(page,'Calendar','toolbar=no,location=no,directories=no,status=no,menubar=n
o,resizable=no,width=180,height=160,left=' + mouseX + ',top=' + mouseY );
  cal.focus();
} 

</script>
<body>
<A HREF="#" onclick="windowOpener('calendar.asp?
control=frmview.txtvalue' )"   onmouseover="window.status='Calendar'; 
return true" onmouseout="window.status=''; return true"><IMG 
SRC="images/btnCalendar.gif" ID=imgcal WIDTH="15" HEIGHT="15" ALT="" 
BORDER="0" ></A>
</body>

Please is there any way i could get this window to open next to my icon 
irrespective of the screen size.

Thanx to u all in advance
Ade'

  Return to Index