What I’m trying to do is load a page with a animated gif image saying
“custom graphics is being generated…”. When this page has finished
loading, I want to call a remote method that generates a custom image
and returns it, replacing the first image. The generation of the custom
image takes a few seconds, thats why I want to display the first
animated gif.
(I want the replacement of the image to be done using ajax)
I guess a call to window.onload from javascript may solve your problem.
Is it really possible to call a remote method from a javascript?
That would be the point
This cant be that hard… how do you usually solve these kind of
problems?
window.onload=function(){
<%= remote_function(:update => ‘generatedimage’,
:url => {:action => ‘generateimage’}) %>;
};