Jquery Doctype 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 syntaxerror: expected expression, got '<' site About Us Learn more about Stack Overflow the company Business Learn more syntaxerror syntax error doctype html jquery about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x syntaxerror: expected expression, got '<' doctype 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 jquery ajax:
Doctype Html Syntax Error Python
doctype syntax error and $ is not defined error on remote server up vote 0 down vote favorite My jquery ajax code is working fine on my local server. However, it is not working on the remote server justhost.com. This is driving me nuts. :( Can someone point out on where i'm going wrong? Merry Flowers is the link to my website. When u html syntax error checker go to the website with firebug on, u will be able to see the below mentioned errors. When I try to debug with firebug, i'm getting the following 2 errors: i'm getting a syntax error on the following line: I tried with different doctypes and I was still getting the same errors. i'm getting "$ is not defined error" on the following line: $(document).ready(function(){ Google chrome developer tool's errors: Resource interpreted as Script but transferred with MIME type text/html: "http://www.merryflowers.com/js/jquery.js". jquery.js:1Uncaught SyntaxError: Unexpected token < home:8Uncaught ReferenceError: $ is not defined When i click on network tab for chrome developer tool, jquery.js's type is text/html not application/javascript. While the other javascript files are of type application/javascript. cakephp's original default.ctp code after all the corrections as requested by Lazerblade:
Html->charset(); ?>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 doctype html error in chrome company Business Learn more about hiring developers or posting ads with us Drupal Answers Questions
Doctype Html Syntax Error In Ie
Tags Users Badges Unanswered Ask Question _ Drupal Answers is a question and answer site for Drupal developers and administrators. Join them;
Syntaxerror Expected Expression Got ' ' Angularjs
it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Syntax error: (line 1) in http://stackoverflow.com/questions/10133490/jquery-ajax-doctype-syntax-error-and-is-not-defined-error-on-remote-server Firebug up vote 3 down vote favorite 1 Firebug is complaining about a error in , but the HTML source is passing without problems the HTML W3C validator. Do you have any idea? Sorry, I can't share the source code. 7 share|improve this question edited Jul 18 at 23:36 kiamlaluno♦ 66.7k898194 asked May 5 '11 at 7:52 corbacho 8862820 Did you change the Document type, or is it the standard http://drupal.stackexchange.com/questions/3143/syntax-error-doctype-html-line-1-in-firebug one used by Drupal? Which error does Firebug report? –kiamlaluno♦ May 5 '11 at 8:04 I changed in the theme page.tpl.php to use the HTML 5 doctype, but if I put the default Drupal Doctype also is throwing the error. There is no more information from Firebug than what it's in the title of the question. –corbacho May 5 '11 at 8:14 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted The reason was a failed loaded javascript file. I use the following code to add a JavaScript file: drupal_add_js($p . '/slider.js','module','footer'); So the following HTML was added in the footer of the page: At some point I renamed the file slider.js, so it stopped being loaded, and this is the reason behind the Firebug error. In the "Net" tab, Firebug was not showing any error; it was showing just a "301 Moved Permanently" next to the slider.js file. share|improve this answer edited May 5 '11 at 10:47 answered May 5 '11 at 8:21 corbacho 8862820 The filename was already slider.js. Do you mean you moved the file to another directory? –kiamlaluno♦ Nov 19 '12 at 19:52 add a comment| up vote 3 down vote Maybe this is your Problem, too: http://blog.rki-home.de/2008/10/22/firebug-syntax-error-und-doctype/ It's german so here
included 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 http://richardhulse.blogspot.com/2008/10/javascript-console-syntax-error-on.html inserting 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 syntax error you very 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 html syntax error 2:40 PM 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 l