This also works. :) But thePrice is supposed to add 2, 4, 5, 6, ... to (rsDetail.Fields.Item("ProductPrice").Value).
I tried to change it, but it gives "NaN" back.
I hope you understand what I mean with the "var prodPrice" ?
<script type="text/javascript">
function getPrice(option) {
var prodPrice = document.getElementById("cmPrice").innerHTML
var thePrice;
switch (option) {
case '10':
thePrice = (prodPrice)-1;
break;
case '15':
thePrice = (rsDetail.Fields.Item("ProductPrice").Value);
break;
case '20':
thePrice = (prodPrice)+2;
break;
case '25':
thePrice = (prodPrice)+4;
break;
case '30':
thePrice = (prodPrice)+5;
break;
case '35':
thePrice =(prodPrice)+6;
break;
case '40':
thePrice = (prodPrice)+7;
break;
case '45':
thePrice = (prodPrice)+8;
break;
case '50':
thePrice = (prodPrice)+9;
break;
case '55':
thePrice = (prodPrice)+10;
break;
default:
thePrice = (rsDetail.Fields.Item("ProductPrice").Value);
}
return thePrice;
}
</script>