I need to do polling of the server.
Then use the periodically_call_remote helper
The polling will happen out of jQuery …
Doesn’t really matter which library you’re using. The Rails helper will generate the call you need.
so there is no UI trigger event as such.
Once I get my results back, I’ll use jQuery to manipulate the DOM to
pupulate certain fields … as indicated by the XML returned.
Why? Rails will generate the html, probably a partial, that you need if you let it.
Where I am getting confused is what on the server side picks on the
request? What on the server side sends back status codes 1, 2, 3, and
I understand your confusion. You’re coming at this from a client-side processing model. Rails is server-side technology. You send it a request and it sends back the html / js that you need. As you get started with Rails it pays to let go and let Rails do it for you. If I understand your situation, you’ll use periodically_call_remote to issue a request to your Rails app. Based on the state of something, you’ll render a partial updating your page.
RJS templates are what you’re looking for. Cody Fauser’s pdf document with the same title at O’Reilly is the best $10 bucks you’ll ever spend on this.