I have some calculation to do in some part of my ruby-rails application,
I wish to show a “waiting message” whilw rails is calculating the result
and when the result is already, I can remove the waiting message and put
the final result. I have no idea how I can do this. can some one give me
a clue???
I have some calculation to do in some part of my ruby-rails application,
I wish to show a “waiting message” whilw rails is calculating the result
and when the result is already, I can remove the waiting message and put
the final result. I have no idea how I can do this. can some one give me
a clue???
Thanks you very much
Sayoyo
This action might be a great candidate to use AJAX for… Check out
this simple tutorial on the subject:
Thanks you very much for the info. But, we have already tried, but it
doesn’t really what we need, since we have to tell the users how many
percentage the task has been completed, ajax just allow us the change
the html contain once, but not a interval of time… also, we render to
a new /controller/action when the calculation happens. so ajax can’t
hardly apply here,
Thanks you very much for the information
Saiho
Daniel Owen van Dommelen wrote:
sayoyo wrote:
Hi,
I have some calculation to do in some part of my ruby-rails application,
I wish to show a “waiting message” whilw rails is calculating the result
and when the result is already, I can remove the waiting message and put
the final result. I have no idea how I can do this. can some one give me
a clue???
Thanks you very much
Sayoyo
This action might be a great candidate to use AJAX for… Check out
this simple tutorial on the subject:
Thanks you very much for the info. But, we have already tried, but it
doesn’t really what we need, since we have to tell the users how many
percentage the task has been completed, ajax just allow us the change
the html contain once, but not a interval of time… also, we render to
a new /controller/action when the calculation happens. so ajax can’t
hardly apply here,
Thanks you very much for the information
Saiho
Ajax does have methods for doing your interval thing. Just check the
second page of the tutorial it speaks of it a little… Consider this
little extract from the tutorial:
Just check the Internet a little for some info. Since I’m currently
actually learning Rails (have to know enough to work in it by monday) I
can’t really help you specifically, but Ajax is definately the way to go
here, I believe anyway…
Once again thanks you for the informatin, however, “the interval” you
have mentionned works on a specific html component(oberver field), I’m
really not sure that it will work on a currently running rails processus
(I may be wrong), what we are trying to do is gathering information from
user, than compute the information, to activate the computation, we use
a normal “rails-button” from a form it means, it will send the result on
a new /controller/action. but between the old /controller/action and the
new one, there will pass a several seconds, 10 -20 sec. but since the
“post/get” is already send to server, the browser is waiting… and we
would like to have some “waiting message”, just want to keep the user
eye busy…
Thanks you bery much
Saiho
Daniel Owen van Dommelen wrote:
sayoyo wrote:
Hi,
Thanks you very much for the info. But, we have already tried, but it
doesn’t really what we need, since we have to tell the users how many
percentage the task has been completed, ajax just allow us the change
the html contain once, but not a interval of time… also, we render to
a new /controller/action when the calculation happens. so ajax can’t
hardly apply here,
Thanks you very much for the information
Saiho
Ajax does have methods for doing your interval thing. Just check the
second page of the tutorial it speaks of it a little… Consider this
little extract from the tutorial:
Just check the Internet a little for some info. Since I’m currently
actually learning Rails (have to know enough to work in it by monday) I
can’t really help you specifically, but Ajax is definately the way to go
here, I believe anyway…
Once again thanks you for the informatin, however, “the interval” you
have mentionned works on a specific html component(oberver field), I’m
really not sure that it will work on a currently running rails processus
(I may be wrong), what we are trying to do is gathering information from
user, than compute the information, to activate the computation, we use
a normal “rails-button” from a form it means, it will send the result on
a new /controller/action. but between the old /controller/action and the
new one, there will pass a several seconds, 10 -20 sec. but since the
“post/get” is already send to server, the browser is waiting… and we
would like to have some “waiting message”, just want to keep the user
eye busy…
there is a rjs tutorial from oreilly for 6 bucks… i highly recommend it
because it shows how awesome it is to use rjs + ajax.
sayoyo
wrote:
Hi,
I have some calculation to do in some part of my ruby-rails application,
I wish to show a “waiting message” whilw rails is calculating the result
and when the result is already, I can remove the waiting message and put
the final result. I have no idea how I can do this. can some one give me
a clue???