Doctype Javascript Syntax Error
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 doctype html syntax error more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags doctype html syntax error python Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like
Syntaxerror Syntax Error Doctype Html
you, helping each other. Join them; it only takes a minute: Sign up HTML DOCTYPE Syntax error on js files up vote 0 down vote favorite I have 5 errors on my login page SyntaxError: syntax error
Javascript Syntax Error Code 0
html> on 5 js files, When I checked those files, I found that they are in a non public directory. How can I ignore these files on Login page or add authorization just for these 5 files ? Thanks javascript html asp.net-mvc share|improve this question asked May 13 '13 at 9:55 user1856386 344 How can you add in a js file...?? –Prasath K May 13 '13 at 9:57 @PrasathK: It's javascript syntax error checker not a doctype in a js file, the server returns an error page instead of the js file. –Guffa May 13 '13 at 9:58 Why are your JS files in a non-public directory? –Lee Kowalkowski May 13 '13 at 10:20 How you include your js files to the page? With ASP.NET syntax? Or simple script tag? –user1823761 May 13 '13 at 10:26 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted There are several things you could do: If you need the files on your login-page: Move the files to a public folder Add a location section to your web.config to make the folder public If you don't need them on your login-page: Make sure you don't reference the files if the user is not authenticated. Example in your view: @{ if (User.Identity.IsAuthenticated){
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
Javascript Syntax Error Unexpected Number
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss javascript syntax error expected expression got ' ' 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 javascript syntax error unexpected string a minute: Sign up firebug returns syntax error in doctype? up vote 31 down vote favorite 6 Why does Firebug return an error in my doctype? error syntax error http://stackoverflow.com/questions/16519275/html-doctype-syntax-error-on-js-files HTML 4.01//EN" source code
..... html firebug share|improve this question edited Oct 10 '11 at 17:29 asked Oct 10 '11 at 15:13 clarkk 4,51727100175 Is this the very first line in your HTML page? –Widor Oct 10 '11 at 15:17 There's no real reason not to use instead of the long version. –zatatatata Oct 10 '11 at 15:20 yes.. its the first line –clarkk http://stackoverflow.com/questions/7714896/firebug-returns-syntax-error-in-doctype Oct 10 '11 at 15:21 1 @Zanfa — Wanting to use a mature validator for a mature specification instead of an experimental validator for a draft, and changing, specification is a real reason. –Quentin Oct 10 '11 at 15:40 add a comment| 3 Answers 3 active oldest votes up vote 80 down vote accepted This usually happens because you are loading an HTML document as a script. This is often caused by (i.e. a relative URI pointing at the current, HTML, document)) or one of the scripts pointing to a 404 error. share|improve this answer answered Oct 10 '11 at 15:38 Quentin 488k56636807 1 +1 was about to answer with the same thing. –Spudley Oct 10 '11 at 15:42 1 just saved me a load of time. nice one –atmd Feb 2 '13 at 23:21 copy, paste error... –VenomVendor Apr 30 '13 at 8:48 I was getting this error from a script tag trying to load a .js file that I had stopped using, and had deleted, but hadn't removed the script tag from my index file. –Sandy Good Mar 17 '14 at 2:33 add a comment| up vote 1 down vote To be more specific, it happened because I was setting empty to "src" attribute of the script element. Thanks @Quentin share|improve this answer answered Aug 10 '14 at 11:23 shibualexis 76611013 add a comment| up vote 0 down vote DOCTYPE nincluded on the page - invalid meaning there is no file in the src tag, or the file does not end in .js.The fix was to remove the CMS code that was inserting http://richardhulse.blogspot.com/2008/10/javascript-console-syntax-error-on.html an empty javascript tag with no src file.Tricky to track down, simple to fix. Posted by Richard Hulse at 10:33 AM 31 comments: Anonymous said... Thanks!!! Saved me a headache, that's for sure :) May 6, 2009 at 8:00 PM jon said... cheers! May 20, 2009 at 10:06 AM Nicolas said... Thanks a lot, you saved my day... June 10, 2009 at 1:54 AM Marvin said... Thank you very syntax error much it saves a lot of my time. :) July 4, 2009 at 5:26 PM Jake said... have no idea how you would find that, but that's a great tip to fix an annoying problem. October 3, 2009 at 2:46 AM Mont said... <3In my case it was both. The wrong file extension was a typo and therefor pointing to a non-existant file. January 11, 2010 at 2:40 PM javascript syntax error Joyel said... I appreciate that. I was fighting with this issue for a long time. I read what you said and started looking at the possibility that the file was loading incorrectly and realized I had named the JS file wrong. That was a waste of 3 days. Thanks, your post helped me figure that out. Thanks again. January 16, 2010 at 5:12 AM Robert L said... Thanks alot! January 26, 2010 at 12:52 AM Fester said... Saved Me DAYS of frustration. I had to include ALL of the .js files that come with script.aculo.us to avoid this error. February 2, 2010 at 3:11 PM jklmnop said... i've found that it's also caused by an empty js file in firefox too.so if the file exists, but it has nothing in it, it will in some cases trigger this error. March 4, 2010 at 3:07 AM adavydow said... Thank you. I spent a day trying to recognize where the problem is. March 10, 2010 at 9:47 AM Anonymous said... Thanks. You saved my world. March 25, 2010 at 5:33 PM Anonymous said... Thanks man, this one helped me out May 25, 2010 at 2:49 AM Mitul said... Thanks. It saved a lot of my time. June 13