Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'JSON' is undefined' issue in IE but not chrome

I am getting the following error with my jquery ajax call in IE9, where I am using Json.stringify().

Microsoft JScript runtime error: 'JSON' is undefined

The same function was working for me till yesterday and still works on my colleagues machine and on chrome on my machine. But for no apparent reason has stopped working on my machine today.

May you please help me understand, what is causing it?

Thanks!

like image 744
OBL Avatar asked Apr 18 '12 23:04

OBL


2 Answers

the solution for me was to turn OFF compatibility mode by clicking the "torn page" icon to the right of the address bar.

Who knows how it got turned on in the first place!

like image 57
Tony Avatar answered Nov 09 '22 09:11

Tony


You need to have your document is rendered in standards mode. See this one http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/fc41127c-0243-4d2e-8e7c-2b311f12e390.

like image 42
g13n Avatar answered Nov 09 '22 09:11

g13n