473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Multiple handlers with Prototype.js

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',alertOnMouseOve r,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 '06 #1
1 1457
oh, and here's the log form the JavaScript consle:
(about Prototype.js)

Error: element has no properties
Line: 1502

Aug 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
3
by: Jeff Shannon | last post by:
I'm having some difficulty getting my logging configuration set correctly. I'm using a config file (copied at end of post), with the intent of setting several loggers which write to a combination...
6
by: Peter M. | last post by:
Hi all, If an event has multiple subscribers, is it possible to cancel the invocation of event handlers from an event handler? Or to be more specific: I'm subscribing to the ColumnChanging...
1
by: bneron | last post by:
hello, I use the logging module include in Python 2.4 distribution, and I 'd like to have a logger witth several Handlers . I know how to do this by coding in python, but could I specify this...
7
by: andrewfsears | last post by:
I have a question: I was wondering if it is possible to simulate the multiple constructors, like in Java (yes, I know that the languages are completely different)? Let's say that I have a class...
6
by: Murray Hopkins | last post by:
Hi. THE QUESTION: How do I get a reference to my Object when processing an event handler bound to an html element ? CONTEXT: Sorry if it is a bit long. I am developing a JS calendar tool....
1
by: Christian Sengstock | last post by:
Hi all, i have a js application with several event handlers which i manage via prototype .bindAsEventListener. On normal page navigation ( link navigation ) i finish all events handlers...
7
by: Dom | last post by:
In CSharp, can you have multiple handlers for a single event? For example, for a textbox TextChanged event, can I have two separate handlers called up? I have 4 text boxes, and the TextChanged...
12
by: Daz | last post by:
Hi guys, I'm trying to make a script.aculo.us sortable list have a limited number of elements in it. Now I can check for this really easily and have a warning message, and of course the php...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.