jQuery Library for SharePoint Web Services (SPServices) 2013.01 Released
Tonight I’ve released SPServices 2013.01. If you are using an earlier version of SPServices, I strongly suggest that you upgrade to this version, as you will see some performance improvements and there is some nice new functionality. Thanks to everyone who downloaded the beta and provided feedback.
jQuery Promises
By far the most exciting thing in this release is jQuery promises, or deferred objects. I’ve written about this several times already here, here and here. I won’t belabor the point too much, but if you’re interested in increasing the efficiency of your code and getting ready for the way you are likely to work with the REST Web Services in SharePoint 2013, you should get familiar with using promises.
Other Release Notes
There are other goodies in this release, and you can see the full list of enhancements and improvements on the download page. Note the link to the Issue Tracker items for this release. I’ve gotten a bit lazy with the release notes, so for this release the items in the Issue Tracker contain all of the details.
Marc,
I use SPServices frequently in my role at work, and it’s an amazing library. I just wanted to ask, in previous versions, you had specified that it was built to be compatible with jQuery v1.8.3. I was just curious if that was still considered the most stable build with this, or if it might be safe to jump up to jQuery 2.0.2.
Anyhow, thank you for providing this fantastic catalog of solutions. I thank you, my manager thanks you, and my sharepoint admin thanks you.
Nathan
Nathan:
As you probably know, the jQuery team has forked the development into two ongoing version streams. It only makes sense to jump to 2.x in certain circumstances, and I think it’s rare with SharePoint. Be sure to read the release notes: http://blog.jquery.com/2013/04/18/jquery-2-0-released/
I’d recommend going to 1.10.1, though. I’ve done some *very* rudimentary tests and it seems to work fine.
M.
Thank you for your response, Marc!
Hi does this work with jQuery 1.9.1 yet?
No. That version has a bug with XML processing. SPServices works with the 1.10.x versions.
M.
Marc,
I’m just started learning jQuery and I’m testing your library, which seems a great tool. The issue is that I can’t get it to work.
This is what I have:
$(document).ready(function(){
alert (‘jQuery on.’);
var thisSite = $().SPServices.SPGetCurrentSite();
alert (‘Hello World! Your site is : ‘ + thisSite );
});
I can see the ‘jQuery on’ message, but that’s about it. The second alert doesn’t show. What am I missing here? I tried with the 1.8x version, and the same happened.
Ernesto:
Your issue was probably the reference to the SPServices .js file. You need to reference both jQuery and SPServices.
M.
Marc,
Thanks for the reply, but it started working next day. I didn’t change anything, it just started to work. I have another question; I have a web part that to show values from a Custom List, is it possible to create form using jQuery and your library to populate this Custom List? I’m sorry, but I’m really new with jQuery. Thanks again Marc.
Sure, you could create a fully custom form. What don’t the default forms do for you?
M.
Marc, Thanks for the update. Are all the column references in your CascadingDropdown example pointing to the field name or the column name?
I’m trying this with your 2013.01 and jQuery 1.10.2.min
Marc, answered my own question after I clicking through several links.
I’m trying this in SP2013 with just Region & State, but no luck. No errors, but states do not filter. Heres the code:
$(document).ready(function() {
// Set up the cascade from Region to State
$().SPServices.SPCascadeDropdowns({
listName: “Locations”,
relationshipList: “States”,
relationshipListParentColumn: “Region”,
relationshipListChildColumn: “Title”,
relationshipListSortColumn: “Title”,
parentColumn: “Region”,
childColumn: “State”
});
});
Gman:
Can you post this over on the SPServices Discussions?
M.