Well there are actually several problems with your script. first of all, javascript recognizes only the name tag to reference your objects in html.
in other words change:
<INPUT onclick=tom1() type=button value=Calculate>
to:
<INPUT onclick="tom1();" type="button" value="Calculate" name="Calculate">
you might have noticed some other changes i made...it's a good idea to always put values in quotation marks, just a good html programming technique because some times html cannot pick up certain symbols unless they are in quotes so your code will be mangled.
also, you need to trigger the last event
so make the code at the bottom:
function dispMsg() {
if (document.form1.total2< 80) {
document.write("no")
}
else {
document.write("yes")
}
}
and move this code up to the top so it's defined before the html
and then to trigger it, change:
<INPUT size=5 name=total2>
to <INPUT size="5" name="total2" onChange="dispMsg();">
----------------------------
http://aeonofdarkness.com