On 1/5/06, Gregory Hill <[EMAIL PROTECTED]> wrote:
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.

Great, thanks to both of you, i am going to investigate the iframe technique

Tarek

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



--
Tarek Ziadé | www.afpy.org
Python - why settle for snake oil when you can have the whole snake?
(Mark Jackson)
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to