http://www.quirksmode.org/dom/inputfile.html
On 3/13/06, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
After some work, I finally figured out a way to do it. There seem to
be others that have had the same question as me, so maybe this is
useful to someone. It is a little hackish because I couldn't find a
way to get input-tags with type "file" to layout correctly. If someone
knows a better way to upload files please tell me. Also I haven't
tested the method in any other browser than Firefox and Galeon but in
those it seem to work. Also qooxdoo doesn't have a form element so
it's not obvious how one should do it because you need a form element.
You need two parts, a QxTextField with type set to "file" and a
QxIframeTransport. When you want to upload the file you must clone the
input-tag in the QxTextField widget and attach it to
QxIframeTransport's _form element. Then you set the _form's enctype to
"multipart/form-data" and call setMethod("POST") on the
QxIframeTransport and submit the form. You can also add an handler
with addEventHandler to QxIframeTransport to know when the upload has
completed.
I have attached an example of it, which maybe can be added to qooxdoo?
--
mvh Björn
--
--- Petr Simek
