it sends a json object to the server which you remove the slashes and 
decode -

example in php

$posted=str_replace("\\"","\"",$__POST['varaible_2'];

$json=json_decode($posted);

// $json is now a multi dimensional array you can access

Alex Mcauley
http://www.thevacancymarket.com
----- Original Message ----- 
From: "C K Kashyap" <[email protected]>
To: <[email protected]>
Sent: Saturday, October 17, 2009 6:17 PM
Subject: [Proto-Scripty] Re: A question about submitting multiple parameters 
using Ajax.Updater


>
>> for example...
>> var data={};
>>
>> for(i=0; i<=10;++i) {
>> data[i]=i;
>> }
>> var params=Object.toJSON(data);
>>
>> var request=new Ajax.Request(.......
>>
>> parameters : {
>> variable_1 : 'Hi i am variable one',
>> variable_2 : params // The json object
>> }
>> ...........
>
> This did not quite work ... it looks like Object.toJSON returns a
> string and on the server side what I get is
>
> "variable_2" => "{\"data ...
>
>
> Regards,
> Kashyap
>
> >
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to