Oh, and to serialize your stuff, you can use the nifty serialize method
jQuery provides for the forms : http://docs.jquery.com/Ajax/serialize ;
basically you input a form, it outputs a JSON string containing its data.

Michel Belleville


2009/11/23 Michel Belleville <michel.bellevi...@gmail.com>

> Well, to store things client-side you've already got it halfway, you know
> how to store stuff.
>
> Now you retrieve it the same way, except you don't pass the second
> parameter.
> var my_acorn = $('div').data('test');
>
> Nothing tough here.
> (that's all in the doc I've given you anyway)
>
> Now if you wanted to query your server and get json data, .getJSON() is
> your best bet indeed, and http://docs.jquery.com/Getjson will tell you
> exactly how to use it. I'll let you handle the server-side part using your
> favorite flavour of server, language and data storage.
>
> Michel Belleville
>
>
> 2009/11/23 Bjorn Symister <bjorn....@gmail.com>
>
>  Hi Michael, could you elaborate a bit more.  I am completely lost...
>>
>> If I was to store the data as such “ $("div").*data*("test", { first: 16,
>> last: "pizza!" });
>> .  How would I retrieve that data from a remote server using .getJSON or
>> something similar?
>>
>> Thanks for your help.
>>
>>
>>
>> On 11/23/09 4:45 AM, "Michel Belleville" <michel.bellevi...@gmail.com>
>> wrote:
>>
>> The jQuery way uses this method : http://docs.jquery.com/Data
>> Another is to hide an html element that holds your data, but you'll
>> probably like .data() better.
>>
>> Michel Belleville
>>
>>
>> 2009/11/22 Niche <bjorn....@gmail.com>
>>
>> I have 2 servers, a front end and a backend.  I cannot execute server
>> side scripts on the front end server.  I need to get information from
>> a form and pass it to my backend server.  I must use Ajax for this.  I
>> am doing this with jQuery.  I would like to store the form field
>> information in JSON format and then read it on the backend server.
>> How would I go about this, thanks.
>>
>>
>>
>>
>

Reply via email to