This is a migrated thread and some comments may be shown as answers.

[Solved] jquery-1.4.4.min.js Error

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alan Mosley
Top achievements
Rank 1
Alan Mosley asked on 20 Jan 2011, 04:02 AM
I have converted a MVC2 app to MVC with the latest telerik controls. now i get an anoying javascript error "syntax error line 2"
line 2 is the doctype, if you remove it the error goes to the next line.
if i change script to 1.4.1 or any other version there is no error.
the error is on every page, even empty pages like below

This is very hard to bug, since i do not get an error in the script itself.

any help

<!DOCTYPE html>
   
<html>
<head><title>
      
    Eclipse Universal Administration
   
</title>
   
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
    <div>
          
   
    <h2>Eclipse Universal Administration</h2>
   
   
    </div>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Danan
Top achievements
Rank 1
answered on 01 Feb 2011, 05:18 PM
Did you check to make sure the jquery file is saved as UTF8 without BOM (Byte Order Mark).  If the script has the BOM in it you will get these kind of errors.  You can download notepad++ and open the file in notepad++ and switch the encoding by selecting the encoding menu then selecting Convert to UTF-8 without BOM.
Tags
General Discussions
Asked by
Alan Mosley
Top achievements
Rank 1
Answers by
Danan
Top achievements
Rank 1
Share this question
or