java script


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: java script

  1. #1
    cam Guest

    java script


    you know in vbs how you can have a function button1_onclick()

    is there a way to have such function in javascript? instead of using the
    onclick method...

    Thanks

  2. #2
    Dan Guest

    Re: java script

    In javascript is called Event Capturing, for IE all you do is use
    object.eventtocapture, or say
    document.FORMNANE.ELEMENTNAME.onclick=FUNCTIONTOEXECUTE;
    For Netscape, you need to first capture the event by
    window.captureEvents(Event.CLICK), if you want to capture multiples,
    then -> window.captureEvents(Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP |
    Event.RESIZE), once you've initialized the event capture, then you define
    the actual capture, window.onmouseup=FUNCTIOTOEXECUTE; and so on. NS does
    event capturing at the window level, not other objects, you can release
    event capturing by using window.releaseEvents(Event.CLICK) and so on for NS,
    in IE you just set it to null, document.onmouseover=null;

    Dan
    "cam" <cambuzzsaw@yahoo.com> wrote in message
    news:3c06adf1$1@147.208.176.211...
    >
    > you know in vbs how you can have a function button1_onclick()
    >
    > is there a way to have such function in javascript? instead of using the
    > onclick method...
    >
    > Thanks




  3. #3
    Russell Jones Guest

    Re: java script

    In IE, you can use
    <script language="javascript" for="Button1" event="onclick">
    // event code here
    </script>
    "cam" <cambuzzsaw@yahoo.com> wrote in message
    news:3c06adf1$1@147.208.176.211...
    >
    > you know in vbs how you can have a function button1_onclick()
    >
    > is there a way to have such function in javascript? instead of using the
    > onclick method...
    >
    > Thanks




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center