Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
JS Error in IE8
jayantb
I am getting "Object is Null or not an object" error in IE8 for document.getElementById().focus. Same is working fine in IE6.
Does anybody know about this error and how to handle it in IE 8?
Find more posts tagged with
Comments
Rick Poulin
Assuming you meant .focus() with parens. Might be working in IE6 by accident. Does it work in Firefox/firebug without error? Suggest you alert() the value of your element first, to make sure it's a non-null element that actually supports the focus() function. You can also check that
typeof(document.getElementById('helloworld').focus) == 'function'
returns true... though given your error message, I expect that getElementById() is actually returning null...
tulika
Hi,
I am trying to generate id by js. And it is being generated in all browsers except in IE7 and IE8. If you have any solution then please let me know.
Tulika
jayantb
I Got solution for it. in document.getElementById function Name is used instead of Id which is not allowed in IE 8. Same is wokring fine in IE 6.