The basic code I’m using is: (Thanks to JMRKER)
[code=php]<html>
<head>
<title>generic calculator javascript</title>
<script type=”text/javascript”>
function CalculateTotals(info) {
f=document.calculator;
f.first_result.value = Number(info);
}
</script>
</head>
<BODY >
<form NAME=”calculator” method=”post” ACTION=”” onsubmit=”return false”>
<TABLE>
<TR>
<TD>First Number</TD>
<TD><input type=”radio” NAME=”first_number” value=”1″ onchange=”CalculateTotals(this.value)”></TD>
</tr>
<tr>
<td>Second Number</td>
<td><input type=”radio” name=”first_number” value=”2″ onchange=”CalculateTotals(this.value)”></td>
</tr>
<TR>
<TD> First Result</td>
<td> <input NAME=”first_result” size=”4″ > </TD>
</TR>
</TABLE>
</form>
</body>
</html>
and now I need to de-select the radio buttons after
it has been selected. I’ve looked around and can’t
seem to find a way.
Only other way I could figure is to refresh the page
but if I do that I loose all my variables.
It’s not at all finished yet, but if you want to
see what I’ve done so far:
[URL=”http://www.anothenservices.com/Test_Area/testfolder/jscrpt_ranking.html”]javascript currency ranking
I’m liking Javascript much more, it’s not as difficult as
I thought it was.