I have a multipe select as part of my imput form and I would like to submit it's selected values via jQuery AJAX.
I've tried to use the following syntax.
$('#multipleselect').val().join('|');
That works, bu the problem I am having is that the user is not required to select anything from the multiple select. If they don't I get an error because you cannot join a null object.
Any Suggestions?
Also keep in mind that there are other values being submitted. For example:
data: "name=" + $("#name").val() + "&multipleselect=" + $("#multipleselect").val().join('|');