Ie7 Object Expected Error Javascript
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 more object expected error in javascript while calling a function about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Object Expected Error In Javascript In Ie8
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping object expected error in javascript onclick each other. Join them; it only takes a minute: Sign up Object Expected error in IE7, works in other browsers up vote 1 down vote favorite I have a site using Google Maps v3 api and some javascript
Object Expected Error In Jquery
to show information on a site I am building. The site works great in all browsers, even IE8. But in IE7, I get an Object Expected error on line 34 (initialize_trip function call I am guessing). I can't seem to figure out why I am getting this error. The page itself is here: http://apt4b.com/test/trips/mountain-west.php The js file that I believe is failing is here: http://apt4b.com/test/js/controller.js calling the initialize_map function located here: http://apt4b.com/test/js/map_config.js Thanks all! javascript internet-explorer-7 share|improve script5007: object expected this question asked Feb 5 '11 at 2:03 probbins222 7916 1 Heh...the world would be a lot better off with IE. –FeifanZ Feb 5 '11 at 2:14 3 @Inspire48.. assuming you meant without –Ben Feb 5 '11 at 2:27 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote In you initialisation file (map_config.js), you have a lot of unneccessary trailling commas. While most browsers will be permisive and ignore that, it is notorious for breaking IE. E.g. { featureType: "water", elementType: "all", stylers: [ { hue: "#335a93" }, { lightness: -20 }, // <-- Here, bad. ] } Basically IE7 is probably ignoring the entire config file as bad syntax. Haven't tried but I reckon that'll fix your problem. Edit: The problematic spots are pretty obvious if you run it through jslint share|improve this answer answered Feb 5 '11 at 2:11 Ben 11.5k104685 Yes, IE7 is not tolerant to the extra commas. –Joy Dutta Feb 5 '11 at 2:27 Ben, I tried the lint and cleared out the comma warnings, but still giving me the error. Any thoughts? –probbins222 Feb 5 '11 at 4:16 The errror appears on line 318 now. probably a different problem –Ben Feb 5 '11 at 4:57 you still have trailing comas in other places in your file (stopover: true,)
here for a quick overview of the site Help Center Detailed answers to
Typeerror Object Expected
any questions you might have Meta Discuss the workings and
Lodash Ie8
policies of this site About Us Learn more about Stack Overflow the company Business Learn javascript runtime error object expected 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 http://stackoverflow.com/questions/4904659/object-expected-error-in-ie7-works-in-other-browsers Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Internet Explorer Object expected error up vote 1 down vote favorite 1 Internet Explorer Object expected error LINE: 64 The code works in Firefox and Chrome. http://stackoverflow.com/questions/17396179/internet-explorer-object-expected-error I keep getting an Internet explorer object expected error. I removed the afflicted code and it just keeps going until any code after line 64 is gone. The problem starts at line 64 which is the below code: AFFLICTED CODE: $(document).ready(function () { preload(preloadi); }); ALL JQUERY CODE: And in the file remote.js: function remoteFunction() { alert('In remote function'); } You would expect the output in this order: Before loading remote.js After loading remote.js In remote function IE gives an error message "Object Expected" because it calls the object expected error function remoteFunction() prematurely. It calls before loading the file remote.js, which contain the declaration of remoteFunction(). This is another unexpected behavior from IE. Fortunately, it can be corrected by adding the attribute defer="defer" to second script invocation. This will specifically prevent IE from executing in order to give a correct output. Other browsers are not affected by the change.Print -- Was this information helpful? Yes / No Tweet Other Articles in Problems with Ad ServingInstructions to troubleshoot and correct issues with ad servingHow do I troubleshoot "Invalid Ad Type" error?How do I troubleshoot "No Ad Found In Rotation" error?How do I troubleshoot "Permission denied" error for a Flash ad?How do I troubleshoot "Restrictions Failed" error?How do I troubleshoot clickTAG issues for a Flash ad?How do I troubleshoot my ISP's nameservers?What are VAST error codes?What is "Click to activate and use this control" message on a Fl