Reinstalling a Rails app on a new server. Part of the app can fork in one of two directions based on the button the user selects. This part isn\'t working, and when I look at
I looked into something like this awhile ago, where there is inconsistency in how different browsers would pass in the value of a submit button on a form. I found the only practical solution was to have javascript in the button to set a hidden field, and use that value instead.
Here is some of my code to differentiate between a save and exit, which goes one way, and save and continue which go another:
<%= hidden_field_tag 'step_commit', '' %>
<%=submit_tag 'Cancel', :name=>'cancel', :onclick=>"javascript:location.href='/';return false;" %>
<%=submit_tag 'Save and Exit', :name=>'exit', :onclick=>"javascript:$('step_commit').value='exit';" %>
<%=submit_tag 'Save and Continue', :name=>'continue', :onclick=>"javascript:$('step_commit').value='continue';" %>