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
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