This project has moved. For the latest updates, please go here.

UI Cleanup w/ $().SPServices.SPRedirectWithID

Feb 22, 2011 at 4:08 PM
Edited Feb 22, 2011 at 4:09 PM

First off, thanks for all your great adds to the SharePoint community.  I can't say enough about the quality of your work.  

My question is about the form redirect on save, specifically related to cleaning up the UI.  I have it working properly and it is really cool, but in my case there are 2 screen refreshes.  After the initial save it reloads the new form but it is blank, then it jumps to the redirected form.  Is this the proper flow or have I set it up incorrectly?  

Assuming that I have it setup properly, is there any way we can control the the initial reload and possibly show a different page (or version of the new form)?  Maybe we can show a "please wait" window.  

Additionally, can we add a delay in case there are certain workflow actions that need to complete before the disp form is ready?

Thanks for all your help!

Feb 22, 2011 at 4:17 PM


You're certainly welcome! What you are seeing is the expected bahavior. However, adding a "Please wait" message or the standard "gears" (See would be a great idea. As for a delay, that is another nice potential improvement.

I'm going to add both of these ideas to my list of potential improvements.

If you come up with anything yourself, please share!


Feb 22, 2011 at 4:20 PM

p.s. On the delay thing, there would be no guarantee that the workflow would complete prior to the end of the delay, regardless what setting you might apply. Another idea would be to check the status of the workflow using the WorkFlow Web Service upon load of the next page and pause there instead.

Apr 19, 2015 at 5:04 PM
Edited Apr 19, 2015 at 5:04 PM
I know this is a really old thread, but I thought I'd add something because it helped me with the 'refresh' issue.

That is, when a user submits the form, before they are redirected to the next form or page, they see a 'blank' "New" form.

I simply added the code below ABOVE the $(document).ready(function() and it works like a charm:
var queryStringVals = $().SPServices.SPGetQueryString();
var myID = queryStringVals["ID"];
if (myID) {document.getElementById("onetIDListForm").style.display = "none";}
Apr 29, 2015 at 1:03 PM

SPRedirectWithID is a pretty hacky function, to be honest. Your improvement is a good one. I may just add it into SPServices!

Apr 29, 2015 at 1:03 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.