Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Fine in Firefox, "Error: Object expected" in IE

    Hi,
    I've never run into this before and was hoping someone could offer some insight. I have an onload method that works fine in firefox, but gives an object expected error in ie7. Anyone have any thoughts.

    http://students.washington.edu/djkammer/test.html

    Thanks,
    Dave

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    well you have a syntax error in your prototype.js file. as for the object expected, that means your script is probably calling to an element in the document before the document actaully exsists.
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #3
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question maybe a dumb question

    Thanks for the catch on the prototype.js. Maybe this is a dumb question, but I don't understand how a script that is loaded in the head is not available in the body. Does IE load referenced javascripts asynchronously? That would seem like a strange behavior...

  • #4
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by djkammer View Post
    Hi,
    I've never run into this before and was hoping someone could offer some insight. I have an onload method that works fine in firefox, but gives an object expected error in ie7. Anyone have any thoughts.

    http://students.washington.edu/djkammer/test.html

    Thanks,
    Dave
    const is supported only in Mozilla, whose console says logText is undefined at line 35, which is correct as you are passing it as a parameter before declaring it.

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Quote Originally Posted by djkammer View Post
    Thanks for the catch on the prototype.js. Maybe this is a dumb question, but I don't understand how a script that is loaded in the head is not available in the body. Does IE load referenced javascripts asynchronously? That would seem like a strange behavior...
    Scripts in the head are loaded asynchronously until rendering starts, I think it's been that way since Netscape 3. Scripts in the body are loaded synchronously.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #6
    Regular Coder Armondo's Avatar
    Join Date
    Feb 2007
    Posts
    144
    Thanks
    3
    Thanked 0 Times in 0 Posts
    i can't help you with what you are doing but it looks great in firefox. whatever implementation you are going to use for that cool little thing for, it'll look cool.

  • #7
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks for all the help. Debugging JS in IE is really frustrating. I think I'll get things working as well as I can in firefox, then find an IE guru


  •  

    Posting Permissions

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