That's now how you are supposed to use page.call. The first argument
is supposed to be the function to call (ie $('my_div').update) and
subsequent arguments are arguments to pass through. What your code
does is ask the browser to execute
I am aware of page.update and page.replace_html but I was wondering how
it actually works.
Basically I have a callback from a scriptaculous effect that will update
a div with the results of some partial so I can not use the built in
page.xxx calls.
Your first post rather implied that you could since you were using
page.call. Anyway, first off you can use update_page to get an rjs
like page object anywhere you happen to be. Secondly prototype's
update stuff is as simple as $('some_div').update('hello world'). If
however you are generating the html in rails and then just injecting
it into some javascript with #{} then you need to quote the string of
html properly (and if you quote the string with " you need to escape
any " in the html (and similarly with '). page.call does all that for
you, there's a helper whose name I forget that does that and to_json
would probably do the trick too.