Multiple handlers with Prototype.js

G

gegaenator

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.
 
G

gegaenator

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

Error: element has no properties
Line: 1502
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top