I have a little script that copys whats in the drop down. But I want the drop to display the firstname and when the firstname is selected I want it to copy the lastname outside. I need to use an attribute other than VALUE
JS:
function copy() {
document.getElementById("label").innerHTML =
document.getElementById("mySelect").value
}
HTML:
<div id="label"></div>
<select id="mySelect" onchange="copy();">
<option value="">Select a person:</option>
<option value="firstname" id="lastname">Firstname</option>
<option value="firstname" id="lastname">Firstname</option>
<option value="firstname" id="lastname">Firstname</option>
<option value="firstname" id="lastname">Firstname</option>
</select>
or see here http://jsfiddle.net/r6Fus/