Question : How to calculate MAX or MIN within a form

What would be the literal code to accomplish the following?

This example has three input fields samplevar, var1, var2.

My pseudo code below incorporates Min.
onchange="samplevar.value=Min(var1, var2);">

What code would accomplish this Min comparison?

Thanks,
RGC

Answer : How to calculate MAX or MIN within a form

Random Solutions  
 
programming4us programming4us