0

I have a form in SharePoint. People can fill out this form. Once this form is completed its go sales department. In this form, there is a Cancel Request button that allows the user to cancel a request that is already filled in. I found out when users click on the Cancel Request button, they have a message telling them that the request will be canceled then nothing happen after. They have to manually refresh the page each time in other to complete the process. I would like to know how I can refresh the page automatically for 3 seconds when users click on the Cancel Button.

0

Below can get you started.

//bind the event with button click.....
    $( "#target" ).click(function() {
// ReferchPage() will be called after 3 seconds of button click.
        setTimeout(function(){ RefreshPage(); }, 3000);
    });

// function call which will refresh page
    function RefreshPage(){
    location.reload();
    }
  • you just need to replace $( "#target" ) with your button id $( "#yourbutton id" )..... paste your html code which is getting generated for cancel button.... – Siddharth Vaghasia Nov 25 '16 at 20:19
  • am using this code: ="<a href='#' onclick=""Script.gestionItemCourant('"&NumDemand&",duplicate')"">"&" Duplicate</a>" – djgibbs Nov 25 '16 at 20:42
  • can i call this method setTimeout(function(){ RefreshPage(); }, 3000); , inside a presaveitem() just before the line return true – prasadwt Nov 5 '18 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.