achilles_aditya
Nintex Newbie

Redirect to the site home page on click of "Cancel"/"Save" button?

Jump to solution

Is it possible to redirect to the home page on click of "Cancel"/"Save" button? JavaScript is not working on button clicks

0 Kudos
Reply
4 Replies
cassymfreeman
Automation Master
Automation Master

Re: Redirect to the site home page on click of "Cancel"/"Save" button?

Jump to solution
Reply
achilles_aditya
Nintex Newbie

Re: Redirect to the site home page on click of "Cancel"/"Save" button?

Jump to solution

Thanks Cassy,

I was able to achieve the functionality for the "Save" button by the form redirect url option. For "Cancel" buon I have added javascript

Reply
amkarthi
Nintex Newbie

Re: Redirect to the site home page on click of "Cancel"/"Save" button?

Jump to solution

hi aditya,
how did you achieve via javascript to redirect page by clicking on Cancel button,
Could you share your code here

0 Kudos
Reply
achilles_aditya
Nintex Newbie

Re: Redirect to the site home page on click of "Cancel"/"Save" button?

Jump to solution

Yes,

  • Change  the "Button Type" to JavaScript in the button control setting
  • Then in the "Advanced" option of the button control I added  CancelRedirect() in "Client Click"
  • In the form settings custom javascript add

function CancelRedirect()

  {

  

   window.location.replace("<Pageurl>");

  }

0 Kudos
Reply