Beta 2 is now available and once again I'd appreciate any feedback,
especially from Safari users.

http://malsup.com/jquery/form/file/jquery.form.b2.js

Test page:  http://www.malsup.com/jquery/form/file/

This version introduces some changes inspired by dojo's
implementation.  To support json and script responses, dojo defines a
contract that insists that such content be returned within the body of
a <textarea> element.  That makes good sense because script and json
responses will often include special characters that will cause
problems when inserted as normal text.  But rather than make that a
requirement I decided to make it optional.  So if you are returning
complex json or script you *should* include it in a textarea like so:

<textarea>
    {
        name: "mike",
        message: function() { if (x < y) alert('yo!'); }
    }
</textarea>

- or -

<textarea>
    for (var i=0; i < max; i++)
        doSomething(i);
</textarea>

In the code above, without the textarea element the "less than"
operator will not work as expected cross-browser.

If you're returning "simple" json or script (no special chars) you can
omit the textarea.

Mike


> If you use this page for testing *please* be kind to my server and
> only upload small files! I'd really prefer that you download the
> plugin and integrate it into your own test environment if possible.

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to