0 Replies Latest reply on Oct 20, 2007 8:21 AM by Misha Silin

    javascript event object bug

    Misha Silin Newbie

      Hi all.
      I have a trouble with "event" object in javascript (in Firefox), when i attach javascript events on some richfaces components. By example:

      this code works fine:

      <script type ="text/javascript">
       function test(e) {
       alert(e);
       }
      </script>
      
      
      <input type="text" onchange="test(event)" />


      Everything is ok and event alerts as event.

      this code works bad:

      <script type ="text/javascript">
       function test(e) {
       alert(e);
       }
      </script>
      
      
      <a4j:form>
       <rich:inputNumberSpinner value="50" onchange="test(event)" />
      </a4j:form>


      When i change spinner value, event alerts as undefined. What have you done with them :)

      Btw, if i put "this" instead of "event" in my test function, it has all properties undefined.

      So, how can i get javascript event source from richfaces component in Firefox (in other browsers everything is ok, because i don't need to use "event" object to retrieve event target (i can use window.target or something, but this approach doesn't works with Firefox))?