How to display forename and surname in seperate text inputs?
<p>In a drop down menu, I have each option displayed like below as an example:</p>

<p><code>scomp23 - Jack Turner</code></p>

<p>Now with this code below:</p>

<pre><code>var text = $(this).find('option:selected').text();
var split = text.split(' - ');
$('#currentAdminAlias').val( split[0] );     
$('#currentAdminForename').val( split[1] );   
$('#currentAdminSurname').val( split[2] );  
</code></pre>

<p>What I am trying to do is display <code>scomp23</code> in <code>#currentAdminAlias</code> text input (this works fine), display <code>Jack</code> in <code>#currentAdminForename</code> text input and  display <code>Turner</code> in <code>#currentAdminSurname</code> text input.</p>

<p>The problem I am having is that it displays both forename and surname in the <code>#currentAdminForename</code> text input only.</p>

<p>Now I know why this happens but my question is how can I display the forename and surname in separate text inputs?</p>
