Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
show spinner while doing a submit form
4 Posts
show spinner while doing a submit form

Use respond plugin for file uploading

http://agilewebdevelopment.com/plugins/responds_to_parent

there is good document

Thanks Amit,

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 like visual_effect(:appear, 'spinner'),

                              :complete => visual_effect(:fade, 'spinner', :duration => 0),
                              :url      =>'url here ' do |f| %>

'display: none')%> </ div> spinner is the image div id

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

4 Posts
Login to add your message