long code is long
function formchange() {
if(Aspen_Selector.Manufacturer.value == "1") {
//----------------
//Chigo
//----------------
BTU = parseFloat(Aspen_Selector.BTU.value);
if(BTU == 9000) {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
Feet = parseFloat(Aspen_Selector.Feet.value);
if(Feet >= 0 && Feet <= 26) {
alert("ASP-ML-115");
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "12000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "18000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "24000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else {
}
} else if(Aspen_Selector.Manufacturer.value == "2") {
} else if(Aspen_Selector.Manufacturer.value == "3") {
} else if(Aspen_Selector.Manufacturer.value == "4") {
} else if(Aspen_Selector.Manufacturer.value == "5") {
} else if(Aspen_Selector.Manufacturer.value == "6") {
}
}
there's the JS I'm working on for it.
here's the HTML
<form name="Aspen_Selector">
Manufacturer:
<select name="Manufacturer" onChange="formchange()">
<option value="0"></option>
<option value="1">Chigo</option>
</select>
<br />
<br />
BTU/Hr: <input type="text" name="BTU" size="14" onChange="formchange()"/>
<br />
<br />
Voltage:
<select name="Voltage" onChange="formchange()">
<option value="0"></option>
<option value="1">115v</option>
<option value="2">230v</option>
<option value="3">24v</option>
</select>
<br />
<br />
Installation Type:
<select name="Installation" onChange="formchange()">
<option value="0"></option>
<option value="1">Side Entry Surface w/elbow</option>
<option value="2">Side Entry Eurface Straight</option>
<option value="3">Rear Entry</option>
<option value="4">Exposed Pump installation</option>
</select>
<br />
<br />
Feet off Head: <input type="text" name="Feet" size="14" onChange="formchange()"/>
<input type="button" value="Submit" onclick="formchange()" />
</form>
it's not working ;o;
what am I doing wrong?
if you were to select 'Chigo', 9000btu's, 115 volts, Side Entry Surface w/elbow Installation, and 0-26 feet off head, it shoud pop up an alert with "ASP-ML-115"
edit: it works in IE but not firefox?