Rails 3.2.11

When users click a "submit" button, the app can show a confirm dialog by
adding

  :confirm => "Are you sure?"

I need to let it appear if certain conditions are met. It does not
appear if the conditions are not met although the submit action would
get executed.

Say, I have a checkbox, then some JavaScript function detects if the
checkbox is checked or not.
Then, when users decide to click the submit button, the javascript
function sees if the checkbox status: the dialog appears if checked and
submit action follows as users confirm it. The dialog does not appear
but submit action gets executed without confirmation.

Could anyone give me some ideas how to implement something described?

soichi

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to