Skip to main content
Nintex Community Menu Bar

JQuery expression that makes a cancel button go back in browser history is not working.

  • February 23, 2016
  • 0 replies
  • 23 views

Forum|alt.badge.img+10


 

Symptoms

 


Specific jQuery solution not working correctly.
 

 

Diagnoses

 


The code had a jQuery selector that was targeting the 'title' property of the button (which as of the latest SmartForms I don't believe is set).
 

 

Resolution

Set the 'name' property of the button to a unique name and altered the selector to target the 'name' property instead of 'title'.
The final expression (to put on a literal data label on the form) was as follows:

 


<script type="text/javascript">$(document).ready(function() { $("[name='buttonName']").click(function() { window.history.back(); });});</script>