tags:

views:

1966

answers:

1

I need this so I can submit a subset of form controls that contain non-ASCII text.

The solution with an iframe element won't work for me because it submits the entire form; I only want to submit a subset of the controls.

I know that I can build a multipart/form-data string myself, but it seems that this must have been done before...

+1  A: 

I would recommend using jQuery and the Form plugin: http://malsup.com/jquery/form/#api

You can use the fieldSerialize() method to submit only a subset of the form and iframe:true option to make it work with submitting files, etc.

Hope that works for you!

Gabriel Hurley
That doesn't work; I checked that option already. The Form plugin relies on the browser to construct the form data from a newly generated iframe; it doesn't use fieldSerialize.But the same technique would be feasible: construct a new iframe with just the fields I want to post. Although just constructing the form-data by hand is probably easier since I don't need file upload.
Luc Rooijakkers