0

Error using gadgets.util.registerOnLoadHandler: E[I] is not a function

I get the following error when using gadgets.util.registerOnLoadHandler to call my onLoad function:

Error: E[I] is not a function
Source File: http://l.yimg.com/kj/yap/combo?/common/js/...jzEFXUKkxxQ-.js
Line: 28

If I make a normal call my onLoad function without using gadgets.util.registerOnLoadHandler, it works fine without the error.

What's up?

by
2 Replies
  • Hi burntber,

    I ran the registerOnLoadHandler function and I think I know what's going on. When calling this function, are you adding parentheses to your callback function like this:
    gadgets.util.registerOnLoadHandler(response());

    What is going on here is that response is running and the return value is being run as the callback function, thus E[l] is not a function. This is the error I saw when I tried adding the parentheses. What you need to do is just pass in the name of the function like so:
    gadgets.util.registerOnLoadHandler(response);

    Hopefully that's the issue, if not let me know.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network

    QUOTE (burntber @ Feb 13 2009, 01:32 PM) <{POST_SNAPBACK}>
    I get the following error when using gadgets.util.registerOnLoadHandler to call my onLoad function:

    Error: E[I] is not a function
    Source File: http://l.yimg.com/kj/yap/combo?/common/js/...jzEFXUKkxxQ-.js
    Line: 28

    If I make a normal call my onLoad function without using gadgets.util.registerOnLoadHandler, it works fine without the error.

    What's up?
    0
  • Thanks again Jon, that fixed it.
    0
  • Any time, let me know if you need anything else

    - Jon
    0
  • Great job Jon. I also encountered a problem like this wherein the caused is just the parenthesis. I wasted a couple of hours finding for the error. Maybe 3 hours before I found out that the problem is only with the parenthesis (damn me). I just laugh at myself and shame on me. LoL.

    This is a good thread for the people like me who wasted a few hours just to found out that only the parenthesis caused the error.
    Simulation pret immobilier
    0
  • I feel your pain - there are many times I've developed apps on different platforms and something was just not working correctly...and I knew it was something small but didn't see it. In those cases all you can do is laugh :)Simulation pret immobilier
    0

Recent Posts

in YAP