Open a popup window exactly at the mouse position.

The code below retrieves the x & y coordinates of the current mouse position and opens the popup window there.
JavaScript


var width = 625 ;
var height = 425 ;

x = window.event.screenX;
y = window.event.screenY;
																																						
msgWindow=open( document.forms[0].SourceDBredirectto.value + "/INVS?OpenForm&InvoiceKey=" + document.forms[0].InvoiceKey.value , "", 'toolbar=no,location=no,directories=no,modal=yes,status=no,menubar=no,scrollbars=yes,resizable=no, top=' + y + ',screenY=' + y + ',left=' + x + ',screenX=' + x + ',width=' + width + ',height=' + height);
if (msgWindow.opener == null) msgWindow.opener = self;

Posted by fbrefere001 on Monday November 22, 2004