jquery multiselect form handling
Posted on 2008-11-13
jQuery is not posting my multiselect forms as arrays, it is posting them as the same value definied three times.
If I choose the values '1', '2', and '3' from a multiselect "chooseme",
I will get a php environment with chooseme = 3 when I submit the request through jQuery ajax post json. I use firebug to look at the POST request and I can see it sending "chooseme = 1", "chooseme = 2", and "chooseme = 3". The thing is I think each time chooseme is being defined in the POST request, it is overwriting the previous value.
However when I send the request as just a standard html request from my browser, it goes into php as an Array.
Can anyone tell me how to get jQuery to submit multiselect form field via AJAX and get an array to arrive at PHP?