rubyonrailsin

A Ruby and Rails talk

Friday, April 2, 2010


[Rails] Re: providing feedback to users

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

It can by manage if you you using AJAX, and it's many ways to do it,
there one:

just show some <div id='waiter' style='dislpay:none'>pleas wait</div>
on 'ajax start' event and hide this one on 'ajax end' event.

If you choose jqure (jquery.com) it would look like:

$("#loading").ajaxStart(function(){
$(this).show();
});

("#loading").ajaxStop(function(){
$(this).hide();
});

http://api.jquery.com/ajaxStart/
http://api.jquery.com/ajaxStop/


On Apr 2, 1:25 am, mstoth <mich...@virtualpianist.com> wrote:
> I have an application which does some time-consuming work after a form
> is submitted.
> I'd like to have a little message saying "please wait" but I'm not
> sure how to implement that.
>
> I'm thinking somehow you have to send a page to the browser from the
> method that is being called by the form.
> Sounds like a basic thing but I'm kind of new to RoR.
>
> Any ideas?
>
> -Michael

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

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive