What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 12373 |  Welcome, Guest!   Register  Login
 Home > Blogs > Others > jQuery.find not working in IE7 for xml data ...
Ketvin

jQuery.find not working in IE7 for xml data

 Blog author: Ketvin | Posted on: 8/9/2012 | Category: Others Blogs | Views: 813 | Status: [Member] | Points: 75 | Alert Moderator   





As part of troubleshooting a shareoint functionality, we found that jQuery.find not working.

We were using jQuery.ajax to call a sharepoint web service and in success function, finding an element in response xml to render it on div.

We fixed this and there are couple of options to fix this that we found from stackoverflow.

1. add dataType: 'xml?' in jQuery.ajax and that will fix it.

2. in response, check for browser is IE7 and variable that is having data is blank, do it with another method, here is javascript code:


if ($.browser.msie && liHtml == "") {
xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async = false;
xml.loadXML(response);
liHtml = $("XmlTagNameToFind",xml).text();
}

ligHtml here is the variable which has jQuery.find().text() output.

I hope this will he you as well.

For more info about Sharepoint Development Visit - http://www.binaryrepublik.com/ or Contact via Phone: (229) 299 4233 or Email - info@BinaryRepublik.com


Found interesting? Add this to:


About ketvin velly

Experience:0 year(s)
Home page:http://www.sharepointengine.com
Member since:Wednesday, October 27, 2010
Level:Starter
Status: [Member]
Biography:
>> Write Response - Respond to this post and get points

More Blogs

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 12:08:38 AM