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 -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Feb 16, 2007, at 11:20 AM, sayoyo wrote:> > 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 > > -- > 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Try this if you are typing the html <input type="submit" value="submit" onClick="return confirm(''sentence?'');"> if you are using the submit_tag helper method, I believe you can just add the :confirm to it. Fredrik On Feb 16, 1:20 pm, sayoyo <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Feb 16, 2007, at 11:20 AM, sayoyo wrote:> > 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 > > -- > 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Michael, Thanks you very much for the information!!! Sayoyo -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---