In that case all you need to do is use DOM methods to get the value of each option, then use split() to get the part of the value after your nominated separator and use DOM methods again to write the appropriate value from the output of spilt() to another element.
The script below will fill in your text box for you after selecting a product. The <option> value holds the unit price of the product selected.
If you want to store more than one thing in relation to the product selected, use an array holding all of the required info. The <option> value in this case could be the index number of the array.
<html>
<head>
<title>Unit Price</title>
<script type=“text/javascript”>
<!–
function getSelected(selectObj)
{ // check if invalid selection
if(selectObj.selectedIndex==0){ return; }
// ------------
// valid selection, so continue to write to text box
document.form1.unitPrice.value=selectObj.options[selectObj.selectedIndex].value;
}
//–>
</script>
<style type=“text/css”>
<!– #seL1 { position:absolute; top:100px; left:100px; text-align:left; } #seL1 p { margin-top:0px; margin-bottom:3px; }