Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Edited Task: SPFilterNode and node name mismatching [10186]

$
0
0
I've ran into this issue recently rolling my own AJAX calls. The nodeName returns as <Z:ROW ... /> instead of the normal <z:row ... />. I noticed this when testing browsers and have never ran into this before, so it very well could be localized to my environment that I'm currently working on. Either way, it's a small tweak I'd figured I'd share:

```
$.fn.SPFilterNode = function(name) {
name = name && name.toLowerCase() || "";
return this.find('*').filter(function() {
// Handles inconsistent uppercase/lowercase issues.
var nodeName = this.nodeName && this.nodeName.toLowerCase();
return nodeName === name;
});
}; // End $.fn.SPFilterNode
```

Cheers,
Matthew

Viewing all articles
Browse latest Browse all 6517

Trending Articles