I have a bit of code here that I created, and I was hoping someone could tell me where my error is. The goal is to click an image whose value is “x” and the text area value becomes itself + x. The end goal is to have 5 images with 5 different values, and clicking one adds a different amount to the textarea… Here is the code:
<form name=RupCalculate>
<script language=”JavaScript”><!–
function RupCalculate()
{
eval(“document.RupCalculate.RupTotal.value = ”;”);
eval(“q = document.RupCalculate.GreenRup.value;”);
if (q)
{
eval(“document.RupCalculate.RupCalculate.value=’1′”);
}
}
// –></script>
<img src=images/GreenRup.bmp name=GreenRup onclick=”RupCalculate();” Value=1><br><br>
<input type=text name=RupTotal value=0 onfocus=”this.blur();”><br><br>
</form>
I have also tried input type=image. But that creates a submit type button and changes the page back to itself with a querystring. I want it all to stay on one page, if ya know what I mean. Thanks for any help.