Hi there,

I've got a problem trying to send an array in an Ajax.Updater call... I
need help, may anyone take a look at this? :(

I have an array called customers in the javascript method which contain
@customer objects. I need to send it in the ajax request, and I've tried
several things without success:

a)
new Ajax.Updater('content_search', '/crmcustomers/content_search',
{parameters: {array[]: customers}});

b)
new Ajax.Updater('content_search', '/crmcustomers/content_search',
{parameters: customers, method: 'post'});

c) (this is the closest one I think.. it gives me an array whose size is
zero... but at least it's an array!)
new Ajax.Updater('content_search', '/crmcustomers/content_search',
{parameters: "customers_array[] = '<%=@customers%>'"});

I've tried quite a lot more things looking at a lot of topics in this
forum, and I'm really stuck on this.

I think I'm missing both sides: the way of sending the array by params
in the ajax request, and the way of retreiving the array in the action
'content_search' in my controller!

Any help will be very very welcome...

Many thanks!

Monica
-- 
Posted via http://www.ruby-forum.com/.