Confirmation dialog on a submit button

HI,

I have a form and a submit button, I try to display a confirmation
dialog before the submit button trigger the action, (it confirmation is
negatif, action will not be triggered.) I know I can to this with
link_to( :confirm=>‘sentence?’) but can I do the same thing with a
normal submit button, and how???

Thanks you very much

Sayoyo

You can try this:

http://javathehutt.blogspot.com/2006/07/rails-realities-part-15-ajax-
modal.html

Or there’s something that was posted on errtheblog called redbox.
I’ve not looked at it myself.

-Michael
http://javathehutt.blogspot.com

Sayoyo,

Apologies… I misread your request. Ignore my previous suggestion.
That was for a modal dialog with a form that you’d like to submit via
an AJAX request.

-Michael
http://javathehutt.blogspot.com

Try this if you are typing the html

if you are using the submit_tag helper method, I believe you can just
add the :confirm to it.

Fredrik

Hi Michael,

Thanks you very much for the information!!!

Sayoyo