Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mozilla mouse coordinates

Status
Not open for further replies.

andreas57

Technical User
Sep 29, 2000
110
CH
i want to open a popup next to the cursor when i use cal(). i always get the message back, tha e is not defined. can someone help?


function getX(e) {
var posx = 0;
if (!e) var e = window.event;
if (e.pageX) {
posx = e.pageX;
} else if (e.clientX || e.clientY){
posx = e.clientX + document.body.scrollLeft;
}

return posx;
}
function cal() {
window.open('calendar.php','Calendar','height=110,width=120,left=' + getX(e) + ',top=' + getY(e));
}

andreas owen
aowen@swissonline.ch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top