Hi guys,
I would like to make an Ajax request to the server, which replies a job status and result. If the status is "Error" or "Ok", the client should show the result (containing HTML code) to the user. However, if the status is "Waiting", the client should wait for a few seconds and then automatically send the same Ajax request again. This should continue until it either times out or gets a "Error"/"OK" message.
Any idea for a solution/code snippet like this? I am currently using Rails, JQuery, and Prototype. Many thanks.
Mountain