Does jQuery provides a way to convert to JSON string?

Felix Halim

On Tue, Sep 9, 2008 at 10:22 PM, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
>> > I'm using the jQuery Form PlugIn(http://www.malsup.com/jquery/form/)
>> > to handle my Forms. I like it, but I have a question about an
>> > improvment:
>> > At this time all form fields are send using post, but it wold be nice,
>> > to send all form fields json encoded as one post parameter.
>>
>> > Is there a way to do this?
>>
>> I still searching for a solution for this...
>>
>> Hope, the developer is reading here :-)
>>
>> Greetings,
>> Stefan Sturm
>
>
> It's not supported by the plugin, but you can hook the beforeSubmit
> event and change what is posted to the server.  beforeSubmit is passed
> an array of objects with name and value properties.  You could iterate
> over these, build your json string, and then replace the array
> contents with a single object that has name and value properties,
> where the value prop is the json string.
>
> Mike
>
>
>
>
>
>
> Mike
>

Reply via email to