Javascript puzzle
Thread Starter
Per Ardua ad Astraeus
Joined: Mar 2000
Posts: 18,575
Likes: 4
From: UK
Javascript puzzle
Messing around with a silly little JS script on a website, and although it runs perfectly in IE - guess what? Firefox ignores it saying 'event is not defined' and highlighting the lines 'x ='and 'y ='. Despite intense Googling I cannot work out how I need to 'define' the event variable to allow Firefox to work - can anyone point me in the right direction please? If only........................
Script:
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}

Script:
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}




