title: jQuery $.ajax POST Multiple Select Selections
body: <p>I have a multipe select as part of my imput form and I would like to submit it's selected values via jQuery AJAX.</p>
  
  <p>I've tried to use the following syntax.</p>
  
  <pre><code>$('#multipleselect').val().join('|');
  </code></pre>
  
  <p>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.</p>
  
  <p>Any Suggestions?</p>
  
  <p>Also keep in mind that there are other values being submitted. For example:</p>
  
  <pre><code>data: "name=" + $("#name").val() + "&amp;multipleselect=" + $("#multipleselect").val().join('|');
  </code></pre>