hit this javascript error last night testing a Firefox developed code base for bugs in IE
"object doesn't support this property or method"
I think it was because i had this pattern going:
f_name=document.getElementById('f_name');
Adding a var fixed the problem IE.
var f_name=document.getElementById('f_name');
(IE, remember that app with the blue e?, I only used it for Testing & Support these days, boy is it a chore to debug javascript with IE compared to Firefox!)
anyway, here's a solution which worked for me.
Friday, July 27, 2007
IE Javascript error: document.getElementById()
Labels:
dev,
javascript
10 comments:
Thanks! I developed movielandmarks.com using Firefox and was debugging using IE7, it ended up that the google map object needed to be declared in the global scope before assigning it in the load function.
Thanks for pointing me in the right direction!
Thanks a lot! this was very helpful (ms script debugger, of course, was not!)
Thank you SO much!!!!!
Solved my problem directly.
Marc
Thanks!!!!!!
you saved my head
greetings from Mexico
Awesome man!
Just what i was looking for.
Solved my problem also.
Awesome man!
Just what i was looking for.
Solved my problem also.
thanks!!!! you would marry with you !!!!
IT WORKS! Great!...one question: but adding that "var" the code continues to work in Firefox without problems like before this mod? Thanks!
Firefox should be fine, it's all about the order of scopes
Really works! Thanks!
Post a Comment