Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

both

.find("[nodeName=z:row]" and  .find("[z:\\row,row]" 

give me syntax unrecognized on SharePoint 2007 IE 8 client

trying this code that redirects me to the dispform given a match on title list column from the url querystring ?Title=:

<script type="text/javascript" src="https://.../jquery.js"></script>  
<script type="text/javascript" src="https://..//spservices.js"></script>  
<script> 
$(document).ready(function(){ 
 var queryStringValues = $().SPServices.SPGetQueryString(); 
 var t = queryStringValues["Title"]; 
 var query = "<Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + t + "</Value></Eq></Where></Query>"; 
 var url = window.location; 
 $().SPServices({ 
            operation: "GetListItems", 
            listName: "ApprovalCustom", 
            async: false, 
            CAMLQuery: query, 
            completefunc: function (xData, Status) { 
                $(xData.responseXML).find("[nodeName=z:row]").each(function(){ 
                    id = $(this).attr("ows_ID"); 
                    url = $().SPServices.SPGetCurrentSite() + "/Lists/ApprovalCustom/DispForm.aspx?ID=" + id; 
                    window.location = url; 
                }); 
                } 
        }); 
   }); 
share|improve this question

4 Answers 4

As noted in the SPServices docs, you should use the SPFilterNode function. I'm going to be sure to keep that function working regardless what other changes the jQuery team decides to make.

share|improve this answer

Your syntax is not correct. See the following article for more details on the issue and a workaround:

http://sympmarc.com/2011/11/08/problem-with-jquery-1-7-and-spservices/

Personally, I find it easier to use JavaScript rather than jQuery to parse xml (jQuery is better suited for html DOM). An example here:

http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Pie-Bar-Chart-Connector.aspx

share|improve this answer

This link looks good for what you are asking about, Also a solution to the problem. And a lot of information regarding performance.

http://www.steveworkman.com/html5-2/javascript/2011/improving-javascript-xml-node-finding-performance-by-2000/

share|improve this answer
 I have use following code and this is working for me. Please use this : find("z\\:row,row")

            $().SPServices({
               operation: "GetListItems",
               async: false,
               listName: "Vendor",
               CAMLViewFields: '<ViewFields><FieldRef Name=\'FirstName\' /><FieldRef Name=\'ID\' /><FieldRef Name=\'LinkTitle\' /><FieldRef Name=\'WorkZip\' /></ViewFields>',
               CAMLQuery: '<Query><OrderBy><FieldRef Name=\'FirstName\' Ascending=\'True\' /></OrderBy></Query>',
               completefunc: function (xData, Status) {
                   $(xData.responseXML).find("z\\:row,row").each(function () {
                    alert("found zrow");
                      });
                    }
                 });
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.