[LRUG] Double submit

Murray Steele murray.steele at gmail.com
Fri Jan 17 04:21:58 PST 2014


Sounds to me like the remote=true stuff is broken and the ajax submission
isn’t stopping the click / submit event on the form and so the browser is
also doing a proper non-ajax form request.


On 17 January 2014 11:50, Andrew Stewart <boss at airbladesoftware.com> wrote:

> Hello!
>
> [This isn't a Ruby question.]
>
> I have a Rails 3.0.x app with a form generated like this:
>
>     = form_tag foos_search_path, remote: true, method: 'get', :'data-type'
> => 'html' do
>       = text_field_tag :code, params[:code], autofocus: true
>       = submit_tag 'Find', disable_with: 'Finding...'
>
> From time to time the server receives a double-submission.  The first
> looks like this:
>
>     GET /search/foos?utf8=%E2%9C%93&code=blah&commit=Find
>
> And the second, within 1s, looks like this:
>
>     GET /search/foos?utf8=%E2%9C%93&code=blah
>
> This happened just now with someone using Chrome (it's not an IE problem).
>
> I can't reproduce this and I can't figure out how it can happen.  Any
> ideas?
>
> Thanks in advance,
>
> Andy Stewart
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140117/5f81ed04/attachment-0003.html>


More information about the Chat mailing list