CoolJazz wrote:
> Hi,
> 
> ok, simple question i think.
> 
> I have this update function:
> 
> function divUpdate(id, url, par, val){
>   new Ajax.Updater(id, url, {
>   method: 'get',
>   parameters: {par: val}

Here's your problem. The left hand side of a name-value pair in JSON is a
literal value. You simply cannot use a variable there. Try something like this:

  var params = {};
  params[par] = val;

And then later:
  parameters: params

-- 
Michael Peters
Developer
Plus Three, LP


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to