...

View Full Version : Fine in Firefox, "Error: Object expected" in IE



djkammer
02-14-2007, 12:28 AM
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
(http://students.washington.edu/djkammer/test.html)
Thanks,
Dave

brandonH
02-14-2007, 01:13 AM
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.

djkammer
02-14-2007, 03:13 AM
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...

Arty Effem
02-14-2007, 03:29 AM
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
(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.

liorean
02-14-2007, 06:12 AM
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.

Armondo
02-14-2007, 06:10 PM
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.

djkammer
02-14-2007, 07:19 PM
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 :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum