The only way to submit files via AJAX is to submit the form to an iframe
and have the page loaded after submission call some javascript functions
in the parent window.  I used to do this years ago before all the AJAX
buzz for submitting changes and refreshing data, and it's still the only
method for uploading files.  The reason is security; you cannot give
javascript access to file data on a person's hard drive.

Dojo creates an iframe and submits the form to it, according to that
link you posted.

Something could easily be created for Prototype to do the same thing,
and in fact I might need such functionality in the near future.  If I
write something, I'll be sure to share it.

Greg

> 
> I don't know how (if) it can be done with Prototype/script.aculo.us
but I
> have seen a blog post about uploading with Dojo, but I'm not sure of
the
> full code needed for that:
> http://alex.dojotoolkit.org/?p=528
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to