Hello all, Possibly a simple one - I have a form and an action and then afterwards a redirect_to. When the user submits the form, the data is stored and then the user is redirected to another page. If the user then refreshes the page they have been redirected to, they are then prompted to resubmit the form. Can anyone suggest why this is occurring and how to stop it occurring! Thanks, Alastair ------ Alastair Moore Standards compliant web development with Ruby On Rails, PHP and ASP www.kozmo.co.uk 07738 399038 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Alastair, Alastair Moore wrote:> If the user then refreshes the page they have been > redirected to, they are then prompted to resubmit > the form.What do you mean "prompted to resubmit the form" exactly? Are they taken back to the page with the form on it? Thanks, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bill, If I was to submit a form on a site and then click back, the browser (certainly firefox and camino on the Mac) will often prompt you to submit the form. It''s doing that. It doesn''t show the form again, simply on refreshing it''s as it the page I''ve been passed to was the page that the original form was submitted to rather than redirected to after the form has been processed. This means, for example, a user-sign up form, the user enters their data and then is redirected to a new page after the form has been submitted. If the user then refreshes the page, they are prompted to save their form data again and a new record is stored (or attempted to be stored) in the DB . I will try and put an example up if I''m not being clear :) Cheers, Alastair --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Alastair wrote:> If I was to submit a form on a site and then > click back, the browser (certainly firefox and > camino on the Mac) will often prompt you to > submit the form.The behavior that comes to mind from your description is where a dialog pops up saying something like "the page contains POST data and will be resubmitted if you continue." Is that what you''re talking about?> If the user then refreshes the page, <snip> a new record > is stored (or attempted to be stored) in the DB .Are you sure about the new record being created?> I will try and put an > example up if I''m not being clear :)That''ll probably help ;-) Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---