Skip to main content
Nintex Community Menu Bar

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

  • May 24, 2016
  • 4 replies
  • 36 views

Forum|alt.badge.img+9

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

4 replies

Forum|alt.badge.img+16

Forum|alt.badge.img+9

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


Forum|alt.badge.img+2
  • Nintex Partner
  • August 24, 2016

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


Forum|alt.badge.img+9

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>");

  }