handler is undefined prototype.js handler.call(element, event) create wrapper

148 views
Skip to first unread message

jaikumar

unread,
Nov 9, 2009, 3:55:00 PM11/9/09
to Prototype & script.aculo.us
Hi ,

I am getting " handler is undefined" error in prototype.js Fire
Bug pointing to this method in prototype.js handler.call(element,
event) create wrapper.

Can any one help me to solve this bug.

ColinFine

unread,
Nov 11, 2009, 7:51:10 AM11/11/09
to Prototype & script.aculo.us
Probably not, without more information.
If you asked me to guess, I would guess that you are passing a non-
existent function to 'observe'.
If you asked me to guess further, I would guess that you might be
writing a function call instead of a function,
so:

myelement.observe('click', myFunction);

sets 'myFunction' as the click handler for myelement, but

myelement.observe('click', myFunction()); //!!Almost always wrong!!

calls myFunction and sets the result (which is almost certainly not a
function) as the handler.

But I may be in completely the wrong area, since you haven't told us
anything about what you are doing.
Reply all
Reply to author
Forward
0 new messages