My JavaScript code works in all browsers except ie, I am not sure why. Any help is appreciated, Thank you.
Website is http://illcomputers.comyr.com/custom.php
Javascript Filehttp://illcomputers.comyr.com/scripts/lowendcost.js
JavaScript Code
function updatecost1() {
const keymouse = 40;
const Case = 55;
var data = document.getElementById("data");
var seldata = data.selectedIndex;
var cpu = document.getElementById("cpule");
var selcpu = cpu.selectedIndex;
var mem = document.getElementById("memorylemr");
var selmem = mem.selectedIndex;
var video = document.getElementById("videole");
var selvideo = video.selectedIndex;
var os = document.getElementById("osle");
var selos = os.selectedIndex;
var sound = document.getElementById("soundlemr");
var selsound = sound.selectedIndex;
var dvd = document.getElementById("dvdwrite");
var seldvd = dvd.selectedIndex;
var floppy = document.getElementById("floppy");
var selflpy = floppy.selectedIndex;
var power = document.getElementById("power");
var selpower = power.selectedIndex;
var monitor = document.getElementById("monitor");
var selmon = monitor.selectedIndex;
var speakers = document.getElementById("speakers");
var selspeakers = speakers.selectedIndex;
if (0 == selcpu) {
var cpule = 80;
}
else
{
var cpule = 160;
}
if (0 == selmem) {
var memle = 30;
}
else if (1 == selmem)
{
var memle = 50;
}
else
{
var memle = 60;
}
if (2 == selvideo)
{
var boardle = 65
var videole = 40;
}
else if (1 == selvideo)
{
var videole = 0;
var boardle = 115;
}
else if (0 == selvideo)
{
var videole = 0;
var boardle = 65;
}
if (0 == selsound) {
var soundle = 0;
}
else
{
var soundle = 70;
}
if (0 == selos) {
var osle = 125;
}
else if (1 == selos)
{
var osle = 80;
}
else
{
var osle = 135;
}
if (2 == seldata) {
var datacost = 70;
}
else if (3 == seldata)
{
var datacost = 95;
}
else
{
var datacost = 45;
}
if (0 == seldvd) {
var dvdcost = 30;
}
else
{
var dvdcost = 40;
}
if (0 == selflpy) {
var flpycost = 0;
}
else
{
var flpycost = 25;
}
if (0 == selpower) {
var pwrcost = 28;
}
else if (1 == selpower)
{
var pwrcost = 35;
}
else
{
var pwrcost = 60;
}
if (0 == selmon)
{
var mntrcost = 0;
}
else if (1 == selmon)
{
var mntrcost = 170;
speakers.disabled = true;
}
else if (2 == selmon)
{
var mntrcost = 120;
}
else
{
var mntrcost = 180;
}
if (0 == selspeakers) {
var speakerCost = 0;
}
else if (1 == selspeakers)
{
var speakerCost = 20;
}
else
{
var speakerCost = 40;
}
var mainitems = datacost + dvdcost + keymouse + flpycost + pwrcost + mntrcost + speakerCost + Case;
var lowitems = cpule + memle + videole + soundle + boardle + osle;
var total = mainitems + lowitems;
document.getElementById("amt1").value = "$" + total.toFixed(2);
<select name="cpule" id="cpule" onchange="updatecost1();">
<option name="coreDuo27" value="Core 2 Duo 2.7" onchange="updatecost1();">Intel Core 2 Duo 2.7Ghz</option>
<option name="coreQuad26" value="Core 2 Qaud 2.6" onchange="updatecost1();">Intel Core 2 Quad 2.6GHz</option>
</select>
...
<tr>
<td class="total" name="total" id="total" > Grand Total </td>
<td><input name="amt1" id="amt1" type="text" readonly /></td>
<td><input name="amt2" id="amt2" type="text" readonly /></td>
<td><input name="amt3" id="amt3" type="text" readonly /></td>
</tr>