Welcome Guest, Not a member yet? Register   Sign In
Passing array into controller with ajax
#1

[eluser]Unknown[/eluser]
So I'm using this Jquery multiselect - http://www.erichynds.com/jquery/jquery-u...ct-widget/

How do I pass the array of selected values into my controller using ajax?
The best I've managed so far is to Join the array with "/" so that my url to call becomes
"controller/function/1/2/3", and then have
function($id1, $id2, $id3)
in my controller, though obviously this is horrendous and I want to have an array of $selectedIds as the input to my controller.

I'm not sure if there's an elegant way to do this, I'm fairly new to codeigniter/ajax...

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB