Javascript Error Object Expected
Contents |
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
Object Expected Error In Internet Explorer
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags object expected error in javascript while calling a function Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, object expected error in javascript onclick helping each other. Join them; it only takes a minute: Sign up JS error: object expected up vote 1 down vote favorite I load an internal page that I developed in IE and at the bottom it displays
Object Expected Error In Jquery
some JS error: It says Line 107 character 6. I look at the JScript file and it has this code: function isLessThanStartDate(obj) { var startdate = new Date(document.getElementById('txtSD').value); var enddate = new Date(obj.value); var weekending = new Date(document.getElementById('txtWE').value); if (!(isDate(startdate))) { obj.style.backgroundColor="red"; alert (obj.value + " is not a valid date!"); obj.value=""; return; } if (enddate < startdate) { obj.style.backgroundColor="red"; alert ("End date: " + enddate + " cannot be less then start date: " +
Object Expected Error In Javascript In Ie8
startdate); obj.value=""; } else if (enddate > weekending) { obj.style.backgroundColor="red"; alert ("End date: " + enddate + " cannot be greater then week ending date: " + weekending); obj.value=""; } else { obj.style.backgroundColor=""; } } Line 107 is the line where it says var weekending = new Date(document.getElementById('txtWE').value); Why is this complaining? I don't see anything wrong with it... javascript share|improve this question edited May 17 '11 at 16:01 Dan Davies Brackett 6,95512045 asked May 17 '11 at 15:48 oJM86o 83462658 4 I don't believe the error report uses the phrase "some JS error". What does it actually say? –Quentin May 17 '11 at 15:49 3 If it's IE, it's not much better than that... –Rudie May 17 '11 at 15:51 @David Dorward - @Rudie is right it doesnt display much else..I tried using firebug but it doesnt give me any info (as I dont know how to use it). It says this: User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322) Timestamp: Tue, 17 May 2011 15:52:00 UTC Message: Object required Line: 150 Char: 5 Code: 0 URI: localhost/blah/include/JScript.js Message: Object required Line: 107 Char: 6 Code: 0 –oJM86o May 17 '11 at 15:52 1 could you also supply
here for a quick overview of the site Help Center Detailed answers to any questions object expected error in node js you might have Meta Discuss the workings and policies of
Javascript Object Expected When Calling Function
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring javascript error message popup 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 http://stackoverflow.com/questions/6033546/js-error-object-expected a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Getting “object expected” error when trying to call a function in javascript up vote 2 down vote favorite The window.alert function does not work and the debugger in internet explorer highlights registerForm() http://stackoverflow.com/questions/15757445/getting-object-expected-error-when-trying-to-call-a-function-in-javascript in the onclick event on line 15 and gives the error "Object Expected".