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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wiseman

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

    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 +ClockFromMouse Y-(window.pageYOf fset):event.y+C lockFromMouseY;

    And the whole function is:

    function Mouse(evnt){
    ymouse =
    (ns)?evnt.pageY +ClockFromMouse Y-(window.pageYOf fset):event.y+C lockFromMouseY;
    xmouse = (ns)?evnt.pageX +ClockFromMouse X:event.x+Clock FromMouseX;
    }

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

    Regards.



  • Henry

    #2
    Re: Help: Javascript not working in Firefox "event not defined"

    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 +ClockFromMouse Y-(window.pageYOf fset):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.

    Comment

    Working...