By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

Help: Javascript not working in Firefox "event not defined"

P: n/a
Hello,

I am making a web page and have included a JavaScript named crazy clock. The
page displays fine in IE but not in Firefox. The event console says: "event
is not defined" at line 143. According to notepad plus, line 143 is:

ymouse =
(ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;

And the whole function is:

function Mouse(evnt){
ymouse =
(ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromM ouseX;
}

I am new to javascript and would be grateful if somebody told me how to
solve this problem.

Regards.

Jul 25 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Jul 25, 3:36 pm, Wiseman wrote:
<snip>
... "event is not defined" at line 143. According to
notepad plus, line 143 is:

ymouse =
(ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event. ...
<snip>

It means that however the value of - ns - is defined its value is not
a useful discriminator of web browsers. That is, it is still false on
Friefox. A better subject for the test would be the - evnt - formal
parameter, as that has a direct relationship with the ability to use
an event object passed as an argument to the function.
Jul 25 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.