Multiple handlers with Prototype.js

Discussion in 'Javascript' started by gegaenator@gmail.com, Aug 6, 2006.

  1. Guest

    Hi all,

    I've just started scripting with Prototype library. And my question
    about Event.observe:
    Why the second handler do not work ?

    Code:
    <script>
    Event.observe(document,'load',alertOnLoad, false);
    Event.observe('theDiv','mouseover',alertOnMouseOver,false);

    function alertOnLoad() {
    alert('alertOnLoad !');
    };

    function alertOnMouseOver() {
    alert('alertOnMouseOver !');
    };
    </script>
    When the pointer's above div block element with theDiv attribute
    alert() isn't triggered.The onclick also do not work properly.

    Cheers.
     
    , Aug 6, 2006
    #1
    1. Advertising

  2. Guest

    oh, and here's the log form the JavaScript consle:
    (about Prototype.js)

    Error: element has no properties
    Line: 1502
     
    , Aug 6, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Shannon

    Logging with multiple loggers/handlers

    Jeff Shannon, Jul 6, 2004, in forum: Python
    Replies:
    3
    Views:
    341
    Jeff Shannon
    Aug 7, 2004
  2. June Lee
    Replies:
    2
    Views:
    809
    Jim Cobban
    Apr 13, 2008
  3. Replies:
    9
    Views:
    200
    Thomas 'PointedEars' Lahn
    May 26, 2006
  4. Replies:
    3
    Views:
    271
  5. javascript fish
    Replies:
    0
    Views:
    176
    javascript fish
    Oct 11, 2008
Loading...

Share This Page