Hello,
I have a form with multi select field like so:
<SELECT NAME="cats" id="cats" class="cats">
<OPTION value="1">1</OPTION>
<OPTION value="2">2</OPTION>
...
</SELECT>
If I'm passing one value script works, but if I have multiple options,
it only gets me last in array.
jquery script working this out like:
$(document).ready(function()
{
$("#cats").blur(function(){
alert($(this).val()); //this shows ok (ex. "1,2,3")
$.post("user_availability.php",{ cats: $(this).val
() } ,function(data)
{
alert(data); // this returns only ex. "3"
});
...
user_availability.php only takes passed data echo's for the sake of
simplicity in this case. and the echo is the same as in alert(data)-
that is "3".
Help me please. I'm new to jquery and I need to maintain the same
structure as shown as I have already done this form for 7 more fields,
so a lot of work put in.