title: Jquery: Array entry return boolean instead of actual entry
body: <p>I have stumbled upon a rather impossible task - or I really hope I haven't.
  I am writing a script where I want to populate a html form based on a singlw dropbox entry, without the need of connecting to a database for each entry.</p>
  
  <p>I write the neccessary information into a selectbox value:</p>
  
  <pre><code>&lt;option value="&lt;%=nn%&gt;_&lt;%=bb%&gt;_&lt;%=pp%&gt;_&lt;%=ep%&gt;_"&lt;%=ss%&gt;""&gt;&lt;%=ro("Navn")%&gt;&lt;/option&gt; 
  </code></pre>
  
  <p>Which returns the following HTML code:</p>
  
  <pre><code>&lt;option value="Nuc_Thompson_nuc@boardwalk.org_99_1"&gt;Nuc Thompson&lt;option&gt;
  </code></pre>
  
  <p>When the user change the dropbox, this variable is sent to a script which splits it into an array:</p>
  
  <pre><code>function getval(sel) {
  
        // alert(sel.value)
          var str = sel.value;
          var res = str.split("_");
  </code></pre>
  
  <p>From there I am able to retrieve the array elements and place them into their respective form fields. "_" is the delimeter.</p>
  
  <pre><code>$('#Fname').val(res[0]);
  $('#Sname').val(res[1]);
  $('#Email').val(res[2]);
  </code></pre>
  
  <p>However, when I try to read entry 3 in the array, which in the example above is "99". The script returns a boolean number 1, instead of the actual integer (index number).</p>
  
  <p>Problem is that I need the index number 99 for further calculations, but I cannot figure out how to get it from the array.</p>
  
  <p>When I check the html source code, the index is stored in the selectbox value as 99. But reading it using the array referral returns 1.</p>
  
  <p>Same thing happens when I try</p>
  
  <pre><code>alert(res[3]);
  alert(res);
  </code></pre>
  
  <p>Which both return 1, even tho the sourcecode shows number 99</p>
  
  <p>IF I read the entry into a formfield, it shows up as expected - with the correct index. But not when I try to read it as a variable.</p>
  
  <pre><code>$('#status').val(res[3]);
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p>IT SEEMS I've solved it.
  I read the entry into a variable in stead of reading it directly into the script.
  Well - thank you :)</p>