View Single Post
  #3 (permalink)  
Old 08-08-2007, 05:27 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 803
vadivelanvaidyanathan is on a distinguished road
Default Re: event.clientX and event.clientY is working in IE but not work in firefox?

You need to supply the event, this is predefined but needs to be explicit, so I've made it a function parameter.

Try this:

<html>
<head>
<title>Event</title>
<script>
function openwin(url,x,y,nam,event)
{
var nwin = window.open(url,nam,"resizable=0, menubar=0, status=0, toolbar=0, directories=0, location=0, scrollbars=1")
nwin.resizeTo(x, y);

var posy = event.clientY;
var posx = event.clientX;

nwin.moveTo(posx,posy);
}
</script>
</head>
<body onClick="openwin('somepage.htm',100,100,'childWin' ,event)">
</body>
</html>
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Reply With Quote