Internet Explorer Error Object Required Code 0
7 and 8) ... on my machine in IE 8 it works fine, on my wife's machine (IE 7) it works fine, on my laptop (IE 6) script16389 unspecified error ie it works fine ... and it works in EVERY other browser out there (FF, an error has occurred in the script on this page windows 7 Opera, Safari, Flock)... The guy is making me crazy with this dumb thing and I am saying it has to internet explorer 11 script error keeps popping up be something on his machine because I see no problems, nor get any errors on any of my machines. Here is the code: function show_preview() { window.open("c_pop.php?to=" + document.getElementById('livesearch').value + "&sub=" + document.getElementById('subject').value internet explorer script error + "&mess= " + document.getElementById('message').value, "Link", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=450,height=400,left=30,top=80"); } The error from IE is simple: "Object required" line 2 character 2 - the window.open is line 2 Anyone able to help me get this guy out of my hair cause I give up! SteveWh 2009-06-03 17:23:59 UTC #2 That one machine might be configured with customized Internet Explorer security settings that are more restrictive than the other machines. dc_dalton 2009-06-03 17:28:16 UTC #3 SteveWh said: That one machine might be configured with customized Internet Explorer security settings that are more restrictive than the other machines. He said he shut off all the security settings. I also found some info about Vista screwing up things but haven't heard back from him on whether he is using it. dc_dalton 2009-06-03 17:51:48 UTC #4 Sure enough, he is using Vista ... UGH crmalibu 2009-06-03 17:53:12 UTC #5 Break your code up into many lines so the line number in the error message is more specific. Instead of assuming an object has a property or method, test it before using it. if (window.open) { window.open(...); } var elem = document.getElementById('livesearch'); // elem could be null. trying to use a property of something that is null will throw an error if (elem) { // elem is not null, we can use the property elem.value; } Be aware that an element with the given id needs to exist at the time that script runs for getElementById() to be able to grab it. dc_dalton 2009-06-03 18:20:42 UTC #6 crmalibu said: Break your code up into many lines so the line number in
why? If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 4 of 4 Thread: [RESOLVED] Object Required, Code 0... why? Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display https://www.sitepoint.com/community/t/stupid-ie-object-required-error-only-on-certain-machines-makes-no-sense/5112 Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-28-2010,07:17 PM #1 Chris Jacks View Profile View Forum Posts Registered User Join Date Feb 2003 Posts 102 [RESOLVED] Object Required, Code 0... why? Hi all, I have a script that I have been modifying to allow for multiple expandable and collapsable divs. It works http://www.webdeveloper.com/forum/showthread.php?239092-RESOLVED-Object-Required-Code-0-why fine in both IE8 and Firefox 3.6. The only problem is that in IE8, the "Expand All" link generates a javascript error down towards the bottom-left of the window that when opened indicates an error of Object Required, Code 0. The page which includes both HTML and Javascript can be found here: http://www.cityscope.com.au/test/test2.html If using IE8 you can see the line number on which it suggests (possibly incorrectly) there is an error. From previous searches on this site for similar posts it sounds like it could be an issue with the way I'm referring to DIVs. I have tried many varations to no avail. Can anyone offer any suggestions? It would be nice if I could get rid of this one! Thanks! Chris Officially confused. Reply With Quote 11-28-2010,08:07 PM #2 JMRKER View Profile View Forum Posts Super Moderator Join Date Dec 2005 Location TX Posts 7,699 You're assignments are too big for the expand/shrink command. Use: Code:
Expand All / https://bytes.com/topic/javascript/answers/532868-object-required-error It's quick & easy. "Object Required" error P: n/a DaFallus I'm trying to write a somewhat simple page with dependent drop-down boxes. Unfortunately the entire page is written through PL/SQL so that makes it even more difficult for me to trouble shoot. I know hardly anything when it comes to JavaScript, and I keep getting an error internet explorer saying: "Error: Object required Line: 31 Char: 1 Code: 0" The funny thing is that I ONLY get this error with Internet Explorer. The page works just fine in Firefox but most of my clients will be using IE so this has been driving me nuts. Here is the code on the page that is throwing the internet explorer error error (the page is displayed in a hidden frame).
Any help will be greatly appreciated! Sep 7 '06 #1 Post Reply Share this Question 5 Replies P: n/a VK DaFallus wrote: "Error: Object required Line: 31 Char: 1 Code: 0" The funny thing is that I ONLY get this error with Internet Explorer. You get the same kind of error in Firefox either. The reason you don't see it is that Firefox silently registers JavaScript errors into JavaScript console (select Tools JavaScript Console and here we are). Both are complaining on the li