Hi
I have a function that reads a numeric value from a dropdown menu 'onchange'; the thing is, I have a couple of menus like that, and I would love to make my function more generic, so it would not need to be repeated every time for every dropdown menu...
function showQuantity1(){
var nameArray = getName();
var selOption = document.getElementById('car').selectedIndex;
var y = document.getElementById('car').options;
var quant = Number(y[selOption].index);
if (quant > 0 && !isNaN(quant)){
document.getElementById('quantity1').innerHTML = quant + nameArray[0];
}