views:

1038

answers:

3

Hi, in a web application I am building I need to upload photos without using a form, otherwise it will come up with form embedded in an outer from which is not permitted in XHTML.

I think uploading files is what jQuery.post should be able to do, but I currently can't figure out how to do this using jQuery.

+1  A: 

With jQuery.post you will be only able to send key/value pairs to the server in a POST Request, However you can use plugins like jQuery Multiple File Upload Plugin.

CMS
+5  A: 

take a look at swfupload, it's a pretty nifty little app that should accomplish what you want. otherwise, you could separate out the forms, and just use css/javascript to reposition them if necessary.

Owen
A: 

Have you check out the fieldset element? Why not wrap your input elements in that, then use jQuery to dynamically assign 'submit' functionality, as opposed to trying to attach it to the overall form element?

matt lohkamp