:)

I would suggest you to read about the Ajax/RJS in general and in Rails. 
There are numerous free books/resources available.

For the stuff you just asked, it's like this....

It's called indicator, for which most of the world use an animated gif 
image for the purpose.
So you need to put an indicator image in a hidden state. And then you 
can show/hide it based on the ajax request status.
Here you can pick up any gif image you would like 
http://mentalized.net/activity-indicators/
there are numerous more available on web.

And can implement it as following....

Say, your image is  indicator.gif
put your gif image anywhere in your form or on your page like this...

<%= image_tag "indicator.gif", :id => "any_uniq_indicator_id", :style => 
"display:none" %>


And add this to your form_remote_tag code...  (ps: the loading and 
complete parameters)


<%= form_remote_for :some_symbol, :url => the_url_youve_given, :loading 
=> "$('any_uniq_indicator_id').show()", :complete => 
"$('any_uniq_indicator_id').show()" %>



regards,
Sur

http://crimson9.com




Mamadou Touré wrote:
> Sur Max wrote:
>> You need to use Ajax there.
>> 
>> Instead of form_for  you will need to use form_remote_for.
>> 
>> regards,
>> Sur
>> 
>> http://crimson9.com
>> 
>>
> Thanks Sur, it works, but I need one more thing. When I hit the submit 
> button, this will trigger process that creates the xdp files, but with 
> this change now, the page is too "silent" during the process (the mouse 
> cursor does not move, everything is quite), so the user would thing that 
> nothing is happening. Is there a way to have the cursor mouse like busy 
> during the process ?

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to