I want to carry additional hidden information (for example, zip code) in the HTML select / drop-down list of options and make it available for the javascript function when selecting options for choosing custom changes.
This is what I would like to do (but it does not work).
<select id="sel_activity" onchange="selectionChange(this.info)">
<option info="" value="CAR">CAR PROBLEM</option>
<option info="" value="COFFEE">Coffee Break</option>
<option info="45678" value="INV">INVENTORY COUNT</option>
<option info="23567" value="INVDROP">Inventory</option>
<option info="" value="LUNCH">Lunch Break</option>
<option info="87654" value="MEET">Meeting</option>
</select>
.
.
.
function selectionChange(info){
alert(info);
}
source
share