Javascript Syntax Error Code 0
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have script16389 unspecified error ie Meta Discuss the workings and policies of this site About Us an error has occurred in the script on this page windows 7 Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with internet explorer 11 script error keeps popping up us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just
Internet Explorer Script Error
like you, helping each other. Join them; it only takes a minute: Sign up IE8 throws JavaScript syntax error - outside of a script up vote 4 down vote favorite I'm having a strange issue where IE8 is reporting a JavaScript error outside of a script tag (or so it claims), and breaking all further JS on the page. Here is the offending code:
Analyst Report
ajaxwl() is just a wrapper over jQuery.ajax(), and is used in hundreds of places throughout the site with no issues. IE claims the syntax error (it doesn't elaborate as to what type) is at character 23 of the line with the tag. This is especially strange since that line only has 15 characters. If I inspect the supposed location in the IE8 developer tools, however, it actually puts the error in the middle of thetag on the next line. Here is the official IE error message: User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.1; MS-RTC LM 8) Timestamp: Tue, 12 Jun 2012 21:19:38 UTC M
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 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Javascript Line 1 Syntax error in IE [closed] http://stackoverflow.com/questions/11005105/ie8-throws-javascript-syntax-error-outside-of-a-script up vote 3 down vote favorite 1 Can someone figure out what this Line 1 Syntax error is? I am trying to debug in IE6 and IE7 and can't find the source of the issue. http://ci.elfster.net/apps/game/tree/design.aspx Thanks javascript share|improve this question asked Aug 17 '09 at 23:48 Adrian Adkison 8081325 closed as off-topic by isherwood, Ben Lee, Andrey Chaschev, Mario Sannum, showdev Dec 18 '13 at 23:28 http://stackoverflow.com/questions/1291081/javascript-line-1-syntax-error-in-ie This question appears to be off-topic. The users who voted to close gave this specific reason:"Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance." – isherwood, Ben Lee, Andrey Chaschev, Mario Sannum, showdevIf this question can be reworded to fit the rules in the help center, please edit the question. Link is broken. –showdev Dec 18 '13 at 23:29 add a comment| 4 Answers 4 active oldest votes up vote 7 down vote accepted Just after this comment line: you are trying to embed a javascript: var src = 'http://ads.elfster.com/go/a.aspx?ZoneID=' + ZoneID + '&Task=Get&IFR=False&PageID=27668&SiteID=' + SiteID + '&Random=' + browDateTime; I've got this path: a.aspx?ZoneID=4&Task=Get&IFR=False&PageID=27668&SiteID=1&Random=1250553113754 This URL returns HTML not javascript hence the error you get. share|improve this answer answered Aug 17 '09 at 23:56 DmitryK 4,45411128 Just to clarify a bit: ads.elfster.com/go/… returns:
and you are trying to embed that as a javascript. –DmitryK Aug 18 '09 at 0:00 awesome this is exactly what I needed. One further questReferences & Guides Learning web development Tutorials References Developer https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError Guides Accessibility Game development ...more docs Mozilla Docs Add-ons Firefox Developer ToolsFeedback Get Firefox help Get web development help Join the MDN community Report a content problem Report a bug Search Search Languages Català (ca) Deutsch (de) Español (es) Français (fr) 日本語 (ja) 한국어 (ko) internet explorer Português (do Brasil) (pt-BR) Русский (ru) 中文 (简体) (zh-CN) Add a translation Edit Advanced Advanced History Print this article MDN Web technology For developers JavaScript JavaScript reference Standard built-in objects SyntaxError Your Search Results fscholz Mingun arai Sheppy Potappo Sevenspade SyntaxError In This Article DescriptionSyntaxParametersPropertiesMethodsSyntaxError instancesPropertiesMethodsExamplesCatching a SyntaxErrorCreating javascript syntax error a SyntaxErrorSpecificationsBrowser compatibilitySee also The SyntaxError object represents an error when trying to interpret syntactically invalid code. Description A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code. Syntax new SyntaxError([message[, fileName[, lineNumber]]]) Parameters message Optional. Human-readable description of the error fileName Optional. The name of the file containing the code that caused the exception lineNumber Optional. The line number of the code that caused the exception Properties SyntaxError.prototype Allows the addition of properties to a SyntaxError object. Methods The global SyntaxError contains no methods of its own, however, it does inherit some methods through the prototype chain. SyntaxError instances Properties SyntaxError.prototype.constructor Specifies the function that created an instance's prototype. SyntaxError.prototype.message Error message. Although ECMA-262 specifies that SyntaxError should provide