Split causes "Object doesn't support this property or method" exception
<p>call to <code>split</code> on a variable causes a <em>"Object doesn't support this property or method"</em> exception and I don't know why.
Here's my code:</p>

<pre><code>function getKontaktPersonen(kontaktSelectBox) {
   var kontaktPersonen = [];
   var id_and_name = kontaktSelectBox.attr('id');
   var id_part = getID_PartFromName(id_and_name);
   var textboxname;
   var selectboxname;
   if (kontaktSelectBox.attr('class') == 'kontaktSelectBox') {

        textboxname = "TextBoxKunde" + id_part;
        selectboxname = "SelectBoxKontaktPerson" + id_part;
    } else if (kontaktSelectBox.attr('class') == 'NewkontaktSelectBox') {
        textboxname = "NewTextBoxKunde" + id_part;
        selectboxname = "NewSelectBoxKontaktPerson" + id_part;
    } else {
        return false;
    }
    var kundeBox = $('#' + textboxname);
    var kundeBoxVal = kundeBox.val();
    if (kundeBoxVal != '' &amp;&amp; kundeBoxVal != null) {
     var adr_id = kundeBoxVal.split(';')[1];
      //here comes an ajax call
      //[...]
    }
}
</code></pre>
