Forum Moderators: open
<script type="text/javascript">
function checkTotal() {
qty = document.getElementById('quantity').value;
val = document.getElementById('dropbox')[document.getElementById('dropbox').selectedIndex].value;
var ttl = (qty * val);
alert(ttl);
}
</script>
Product: <select name=dropbox id=dropbox>
<option value=19>Silk</option>
<option value=20>Wool</option>
<option value=21>Cotton</option>
</script>
</select><br>
Quantity: <input type=text name=quantity id=quantity><br>
<button type=button onclick="checkTotal()">CHECK</button>