I want to redirect user after editing item and pressing save button to item DispForm
. I currently have JS code:
$( document ).ready(function() {
$('input[value=Save]').click(function() {
var ur = window.location.assign;
var URL = ur.replace('EditForm.aspx','DispForm.aspx');
window.location.assign(URL);
});
});
Problem with this code currently is, that it works time to time.. Which means, it does redirect to DispForm
few times and then JS seems to fail load and redirect to default AllItems
.