Vicky
Vicky

Reputation: 1235

\u00C2 is not defined error in javascript?

I got this error on following line.

$j(id).dateplustimepicker( "setTime" ,timeVal);

Can you please help me to solve this error?

Upvotes: 0

Views: 1551

Answers (2)

Aaron Digulla
Aaron Digulla

Reputation: 328744

The error is probably not in this line because no string constants are evaluated there. You wouldn't get this error if, for example, id contained the value.

When you get the error again, open the JavaScript console of your browser and look at the complete stack trace. The innermost frame is where you need to be looking.

[EDIT] Since you found the character in jquery-dateplustimepicker.js, this points to the real cause of the problem.

Every text file on your computer has an encoding. But there is no way to tell which one. The problem you have means: Your text/JS file is in UTF-8 encoding but your web server sends it to the browser with a different encoding. The browser then tries to read it but finds odd characters -> error.

Another reason for the error is that someone edited the file, using the wrong encoding. That can happen on Windows, for example, when you load the file with Cp-125x and saves it as UTF-8.

To check, download the file from the web server and do a binary compare with the original.

Upvotes: 3

Vicky
Vicky

Reputation: 1235

I got the answer but i forgot to upload here....Actually i got this problem because, There is  character is present in standard library file of jquery. File name is jquery-dateplustimepicker.js. The character either need encoding otherwise, it creates problem. The character must replace with white space instead of Â.

Upvotes: 0

Related Questions