Home > JQuery, SharePoint > SharePoint, JQuery and z:row when using Chrome

SharePoint, JQuery and z:row when using Chrome

I’ve recently been using JQuery with SharePoint web services quite extensively and initially had a few issues with Chrome not rendering when the same code works fine with IE.  With this post I’ll show you what you need to change for cross browser compatibility as there seems quite a bit of confusion around the web.

A lot of code examples use:


$(xData.responseXML).find("z\\:row").each(function(){

whilst this works in IE & Firefox, it won’t function in Chrome or Safari, but if you are using JQuery 1.5 or greater, change this line to the following and you’ll have a working solution in all browsers.


$(xData.responseXML).find("[nodeName='z:row']").each(function(){

Advertisements
Categories: JQuery, SharePoint
  1. December 27, 2012 at 10:00 am

    thanks that worked

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: