Are you looking for something like this
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Document</title>
<style type="text/css">
</style>
<script type="text/javascript">
function clickedRadioButton(oRbutton) {
var tot = document.getElementById('total');
var t1,t2;
if(tot.value == ""){
t1 = parseFloat(oRbutton.value);
tot.value = t1;
}else{
t1 = parseFloat(oRbutton.value);
t2 = parseFloat(tot.value,2);
tot.value = t1 + t2;
}
}
</script>
</head>
<body>
<form name="form1">
<p><strong>Category 1</strong></p>
<div>
<input type="radio" name="cat1art1" value="1000.09" onclick="clickedRadioButton(this);"/>Category Article 1<br />
<input type="radio" name="cat1art1" value="2000.56" onclick="clickedRadioButton(this);"/>Category Article 2<br />
<input type="radio" name="cat1art1" value="3000.89" onclick="clickedRadioButton(this);"/>Category Article 3<br />
<input type="radio" name="cat1art1" value="4000.52" onclick="clickedRadioButton(this);"/>Category Article 4<br />
</div>
<p><strong>Category 2</strong></p>
<div>
<input type="radio" name="cat1art2" value="100.00" onclick="clickedRadioButton(this);"/>Category 2 Article 1<br />
<input type="radio" name="cat1art2" value="200.02" onclick="clickedRadioButton(this);"/>Category 2 Article 2<br />
<input type="radio" name="cat1art2" value="300.88" onclick="clickedRadioButton(this);"/>Category 2 Article 3<br />
<input type="radio" name="cat1art2" value="400.56" onclick="clickedRadioButton(this);"/>Category 2 Article 4<br />
</div>
<br />
<div>Total <input type="text" readonly="readonly" value="" id="total" name="total" />
</form>
</body>
</html>
Please note that the code used here is just an example.
Bookmarks