Home > object required > object required error in ie

Object Required Error In Ie

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) it works fine ... and it works in EVERY other browser out there (FF, Opera, Safari, Flock)... The guy is making me crazy with this dumb thing and I am saying it has to 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 + "&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 the error message is more specific. Instead of assuming an object has a property or method, test

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Javascript object required https://www.sitepoint.com/community/t/stupid-ie-object-required-error-only-on-certain-machines-makes-no-sense/5112 error in IE up vote 1 down vote favorite i'm creating mulitple planet objects in javascript to handle animation. The animation works fine for each planet but i am getting errors in IE 6/7 saying "object required on line 15 char 2" Code: var earthObj = null; var mercObj = null; var jupiObj = null; var animate; function init() { mercObj = document.getElementById('mercury'); earthObj = http://stackoverflow.com/questions/10576121/javascript-object-required-error-in-ie document.getElementById('earth'); jupiObj = document.getElementById('jupiter'); mercObj.style.position= 'relative'; mercObj.style.left = '54px'; mercObj.style.visibility = 'hidden'; earthObj.style.position= 'relative'; //error on this line earthObj.style.left = '80px'; earthObj.style.top = 300px'; } javascript object animation share|improve this question edited May 13 '12 at 23:50 VisioN 87.2k15146170 asked May 13 '12 at 23:48 user1281921 8629 3 Maybe you missing earth? –VisioN May 13 '12 at 23:50 Show us the markup, and where the script tag is. –Matt Ball May 13 '12 at 23:51 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote Before trying to call an object, test if it exists. earthObj = document.getElementById('earth'); if(!earthObj) { alert("Could not find Earth"); return; } share|improve this answer answered May 14 '12 at 0:08 Niet the Dark Absol 209k37240372 add a comment| up vote 0 down vote I am on mac and don't have any IE to try. Do you get the same error, if you change the code like this: function init() { var earthObj = null; var mercObj = null; var jupiObj = null; var animate; mercObj = document.getElementById('mercury'); earthObj = document.getElementById('earth'); jupiObj = document.getElementById('jupiter'); mercObj.style.position= 'relative'; mercObj.style.left = '54px'; mercObj.style.visibility = 'h

- 16:09 Anonymous Hey, On certain pages where I have included the opentracker js tag I get a javascript error http://www2.opentracker.net/forum/ie-object-required-javascript-error under IE referring? to 'Object Required, line 49, char 1'. If I remove the opentracker code, it works fine - any thoughts? Line 49 of the opentracker http://www.webdeveloper.com/forum/showthread.php?211464-Object-required-IE8-Compatibility code is: if (ep.parentElement) { any thoughts? Much appreciate any help, Andrew Top Login to post comments Wed, 07/13/2005 - 11:54 Anonymous Hi Andrew, Sounds like a conflict object required with another js. Please send us a url to look at, and we will see if we can identify the source? of the conflict. Top Login to post comments Tue, 11/22/2005 - 10:52 Anonymous I have the same problem. http://www.stala.com/ Load the page and click somewhere on the screen. The yellow triangle appears lower left object required error in IE. This error appears only on the front page. I have Google analytics script on that page but removing it doesn't make any difference. Problem goes away by removing Opentracker script. This same thing happens on a another site also: only in the index.html in the server root. Any ideas? Top Login to post comments Tue, 11/22/2005 - 13:36 Anonymous Thank you for posting on the forum. This bug / issue has been investigated and resolved. Please confirm and let us know if you experience further related issues. Top Login to post comments Tue, 11/22/2005 - 16:23 Anonymous Yes the problem has gone now. Thanks! Firefox javascript console displays some errors/warnings too, but I guess they aren't very serious. Analytics causes some too. Couple of examples: Error: pn2 has no properties Line: 51 Warning: assignment to undeclared variable ot_d Line: 1 Top Login to post comments ‹ Previous topic: Broken link for US telephone area codes Next topic: Bug in forecast ›

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 3 of 3 Thread: Object required - IE8 Compatibility Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 06-18-2009,11:27 AM #1 BartvR View Profile View Forum Posts Registered User Join Date Jun 2009 Posts 1 Object required - IE8 Compatibility I've a problem with some javascript code since i upgraded to Internet Explorer 8. The error is: Object required This is the function: HTML Code: function checkAfspraakRows() { var dropdown = document.getElementById("afspraak"); var selitem = dropdown.options[dropdown.selectedIndex].value; <-- the line where the error is generated (i think) if (selitem == "belafspraak") { showRow("datumBelAfspraakRow"); hideRow("datumHersteldRow"); } else if (selitem == "hervattingsafspraak") { hideRow("datumBelAfspraakRow"); showRow("datumHersteldRow"); setHersteldLabel("Hervatting"); } else if (selitem == "hersteldmelding") { hideRow("datumBelAfspraakRow"); showRow("datumHersteldRow"); setHersteldLabel("Hersteld"); } else { hideRow("datumBelAfspraakRow"); hideRow("datumHersteldRow"); } } function hideRow(rowID) { document.getElementById(rowID).style.display = "none"; } function showRow(rowID) { document.getElementById(rowID).style.display = "block"; } And here is the HTML code: Code:

 

© Copyright 2019|winbytes.org.