function calculatePrice(myform){
//Get selected data
var elt = document.getElementById("memoryItem");
var memory = elt.options[elt.selectedIndex].value;
var elt = document.getElementById("hddItem");
var hdd = elt.options[elt.selectedIndex].value;
var elt = document.getElementById("networkItem");
var network = elt.options[elt.selectedIndex].value;
//convert data to integers
memory = parseInt(memory);
hdd = parseInt(hdd);
network = parseInt(network);
//calculate total value
var total = memory+hdd+network;
//print value to PicExtPrice
document.getElementById("PicExtPrice").value=total;
}
Select One Choice from List-Memory Upgrade
8 GB add $49
12 GB add $98
16 GB add $159
Select One Choice from List-HDD Upgrade
1 TB HD add $109
1.5 TB HD add $150
2 TB HD add $199
250 GB SSD add $299
Select One Choice from List- Network Upgrade
56K V90 or X2 Modem add $109
10/100 NIC add $79
Combo Modem and NIC add $279
The new calculated price: