Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] addListener problem

Expand Messages
  • sushil gupta
    there is no error in this code it will works in this way when U press any mouse button then it will first call mouse up event then it will call the mouse
    Message 1 of 2 , May 8, 2006
      there is no error in this  code it will works in this way

      when U press any mouse button then it will first call mouse up event then
      it will call the mouse down.

      SKHOTTA <skhotta@...> wrote:
      I wanted to add listener to multiple events.
      It does not work. Here is the following code.
      Any Idea what is wrong with it?

      /*******CODE***********/



      <HTML>
      <HEAD>
      <TITLE> Test Page </TITLE>
      <body>
      </body>
      </html>

      <script src='js/prototype.js'></script>
      <script type="text/javascript" src="jsd/YAHOO.js" ></script>
      <script type="text/javascript" src="jsd/log.js" ></script>
      <script type="text/javascript" src="jsd/event.js" ></script>
      <script type="text/javascript" src="jsd/dom.js"></script>

      <script type="text/javascript" >

      function click_test_mousedown(e)
      {
                  alert("mousedown");
                 
                  YAHOO.util.Event.stopEvent(e);           
           
      }

      function click_test_mouseup(e)
      {
                  alert("mouseup");
           
      }

      YAHOO.util.Event.addListener(document, 'mousedown',
      click_test_mousedown);
      YAHOO.util.Event.addListener(document, 'mouseup',
      click_test_mouseup);


                 
      </script>





      SPONSORED LINKS
      C programming language Computer programming languages Java programming language
      The c programming language C programming language Concept of programming language

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com

    Your message has been successfully submitted and would be delivered to recipients shortly.