Unable to get value of the property 'parse': object is null or undefined (IE9/IE10)

Oct 11, 2012 at 6:36 AM

I'm trying to make a connection and download anything using oData format. The URL pointing to a service that I'm using returns a nice oData-ishly looking document. Now, I'd like to read in those contents into my JavaScript method and play with it for a while. I can't, though, due to the error that the property parse is not findable. That makes me sad.

According to this page (and a lot of others that I've found) the error in subject is caused by a non-available JSON parser. This issue is apparently a big deal for IE7 and below. But I'm on IE9 and IE10 and both experience the same issue. JSON support is supposed to be integrated into them by default.

  1. What more can be done to make my machine get the data?
  2. Could it matter that the service is on a CRM Dynamics 2011 server?

The code I'm executing to get there is below. It's fetched from the project's site for DataJS at this location. Of course, I've tested that the OData object exists and is accessible.

OData.read(
 
"https://myurl/2011/OrganizationData.svc/crmk_CustomEntitySet",
 
function(dataSet) { alert("Yippi!"); },
 
function(errorMessage) { alert("Buuuu..."); }
});
Oct 16, 2012 at 7:28 PM

Hi Chamster,

  The problem is that your pages is being shown by the browser in compatiblity mode. This is the default mode in IE9 and IE10 when the page is being served from the intranet.. and that includes local host. You can add this tag to your page so that is will always be rendered in IE's latest and greatest mode:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

  If you still need to support old versions of IE or browsers that don't have a native JSON parser, please look here at our FAQ.

Regards,

Alex Trigo. 


Oct 16, 2012 at 9:22 PM

Amazing. So, it turns out that I indeed was running IE7 (sort of), which we joked about at work. Great info, thank you!

May I ask where did you find that information? I made a quick Google search but I returned empty-handed.

Oct 24, 2012 at 4:19 PM

Hi Chamster,

   Yes, indeed you were.  This blog explains nicely about document compatibility in IE (http://msdn.microsoft.com/en-us/library/cc288325.aspx).  From there you can move on.  Also just search around for IE compatibility meta tags  or IE X-UA-Compatible meta tag.

Regards,

Alex Trigo.

Dec 7, 2012 at 7:04 PM

I forgot to thank you.

Thank you. :-)