How to execute remote action once as the page loads?

Did you ever find a solution for this? I have the same problem: I need something like a "call_remote" function.

I've put:

render :update do |page|      page.call 'scroll', 0, 0      page.replace_html :campaign_errors, "ERRORS TEST" end

into an action executed in response to a GET request and got back the expected text/html response:

try { scroll(0, 0); Element.update("campaign_errors", "ERRORS TEST" ); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('scroll(0, 0);\nElement.update(\"campaign_errors\", \"ERRORS TEST"\");'); throw e }

displayed, as expected, as text in the browser.

The question seems to boil down to how to call render :update in a xhr request that returns text/javascript for execution by the browser?

Any ideas about this?