hey all, im having an issue that maybe you could offer me a little advice on? i was thinking that the block of if statements that checks the range value in rightSph would be repeated for the other 3 and directed towards those to display the results. however, even without those three blocks, and what i have right now, entering any number into the other 3 forms results in the image "r39.gif." all four forms are active, despite the fact that i've only (or so i assumed) linked up one to the script thus far.

thanks!


Code:
function showImg() {
var rightSph = document.getElementById("rightSph").value;

document.getElementById("image1").src = "blank.jpg"
// go through ranges in form 1
if (rightSph >= 3.25 && rightSph <= 4.75) {document.getElementById("image1").src = "poly.gif"}
if (rightSph >= 5.00 && rightSph <= 6.50) {document.getElementById("image1").src = "167.gif"}
if (rightSph >= 6.75 && rightSph <= 7.50) {document.getElementById("image1").src = "171.gif"}
if (rightSph >= 7.75) {document.getElementById("image1").src = "174.gif"}
if (rightSph >= -3 && rightSph <= 3) {document.getElementById("image1").src = "r39.gif"}
if (rightSph <= -3.25 && rightSph >= -5) {document.getElementById("image1").src = "poly.gif"}
if (rightSph <= -5.25 && rightSph >= -6.50) {document.getElementById("image1").src = "167.gif"}
if (rightSph <= -6.75 && rightSph >= -7.25) {document.getElementById("image1").src = "171.gif"}
if (rightSph <= -7.50) {document.getElementById("image1").src = "174.gif"}
// go through ranges in right cyl

}

<form style="position:absolute; top:325px; left:700px;">

<span class="rx">
    Form 1 <input type = "text" id = "rightSph" size = "7">
	Form 2<input type="text" id="form2" size="07" />
	x <input type="text" name="axis" size="3" />
</form>

<form style="position:relative; top:10px; left:00px;">
<span class="rx">
    Form 3: <input type="text" name="form3" size="07" />
	Form 4:<input type="text" name"form4" size="07" />
	x <input type="text" name="axis" size="3" />
</form>