Form_tag using :onsubmit => "confirm('are you sure?')". help

hi,
both ok and cancel buttons submits the form…is there a way that when
the user selects cancel that it doesnt submit the form?

thanks!

i was missing the return param!

<%= submit_tag “Save”, :onclick => “return confirm(‘Are you sure?’)”
%>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs