I came across a situation when client wants to redirect different url after item is saved.
By using Jquery I am able to redirect to a different page after user had save all information from page.
Use below Jquery to change redirect URL of save button
$(document).ready(function() {
//Select Save btnSave
var btnSave = $(“input[id$=SaveItem]”);
//Remove Default Redirect Attribute of Save
btnSave.removeAttr(“onclick”);
btnSave.click(function() {
var elementName = $(this).attr(“name”);
var newPostbackUrl = “http://dell-pc:9999/_layouts/settings.aspx”;
if (!PreSaveItem()) return false;
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, “”, true, “”, newPostbackUrl, false, true));
});
});
It’s really a great and useful piece of info.
I am satisfied that you simply shared this helpful info with us.
Please stay us up to date like this. Thank you for sharing.