Hi all, I wanted to ask you a question: I have a form which is used for data and also upload multiple files. The files are loaded when the user does a submit. Many times the files are so heavy that it takes several seconds to do the submit.
What I need is that when the user clicks on the submit button, display a spinner until the completed form to finish loading (ie show a div and hide it if necessary when it is finished loading the form).
The spinner is something like:
'display: none')%> </ div>
and to display the submit button use:'OK')%>
I auditioned with rjs (remote_function (: url => (: action => 'show_spinner'})), and invocation is done, but not working properly.
I appreciate your help
:complete => visual_effect(:fade, 'spinner', :duration => 0), :url =>'url here ' do |f| %>
It works for all fields, except for files fields. As I understand you can not upload files via Ajax, because multipart is not allowed.
Any other idea?
Use respond plugin for file uploading
there is good document