call a Javascript function from controller more than once (in Rails)
Posted
by mm1
on Stack Overflow
See other posts from Stack Overflow
or by mm1
Published on 2010-05-08T19:23:41Z
Indexed on
2010/05/08
19:28 UTC
Read the original article
Hit count: 169
hi.
I have a multiple file upload form(html5) and want to update my view as soon one of the images is transfered to my image server.
Currently I upload the files with ajax and use response_to_parent to update my upload view when all images are transfered to the image server.
Is it possible to call a Javascript function from the controller more than once per action?
def upload
params[:images].each do |file|
upload_to_image_server(file)
#page << Update upload View
end
end
Thanks, Michael
© Stack Overflow or respective owner