you will probably need to set variable 2 as a json object and decode it on
the server.
I have sent json objects like this before to the server and decoded them
back to an array once they arrive.
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
}
...........
HTH
Alex Mcauley
http://www.thevacancymarket.com
----- Original Message -----
From: "C K Kashyap" <[email protected]>
To: <[email protected]>
Sent: Friday, October 16, 2009 9:17 AM
Subject: [Proto-Scripty] Re: A question about submitting multiple parameters
using Ajax.Updater
>
> On Fri, Oct 16, 2009 at 12:36 PM, Alex McAuley
> <[email protected]> wrote:
>>
>> parameters : {
>>
>> variable_1: 'Somevar',
>> variable_2: 'Some Other Var',
>> variable_3: 'Some third var....'
>>
>> }
>>
>> is that what you mean ?
>>
> Almost - except
>
> parameters : {
>
> variable_1: 'Somevar',
> variable_2: {
> a: 'hash members',
> b: 'of',
> c: 'variable 2'
> },
> variable_3: 'Some third var....'
>
> }
>
> A nested hash basically.
>
> 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
-~----------~----~----~----~------~----~------~--~---