SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    addLoadEvent - Error in IE

    I'm using addLoadEvent (http://simon.incutio.com/archive/200...6/addLoadEvent) to attach multiple functions to window.onload.

    This code works in FF & safari, but not in IE:

    addLoadEvent(function() { menu.init(); });

    It gives the error "Object expected".

    addLoadEvent & menu.init are both defined in an external .js file, the file is loaded correctly.

    Any ideas as to what may be wrong?

    Thank you

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit: It does work if I place the addloadevent method in my HTML, is this really necessary?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •