JavaDude
05-01-2005, 04:08 PM
I have the follwing Function I use to add radio buttons in a text box
at the bottom of the page:
<script type="text/javascript">
function update(frm, trg) {
var tot=0;
for(var i=0; i<frm.elements.length; i++) {
if(frm.elements[i].type=="radio" && frm.elements[i].checked) tot+=parseInt(frm.elements[i].value);
}
document.getElementById(trg).value=tot-1;
}
</script>
Is there a way to add radio button values using HTML, I am making an eBay
listing and the Javascript isnt working for somereason...I saw an OnClick event somewhere but I cant find it...any help would be awesome thank you.
at the bottom of the page:
<script type="text/javascript">
function update(frm, trg) {
var tot=0;
for(var i=0; i<frm.elements.length; i++) {
if(frm.elements[i].type=="radio" && frm.elements[i].checked) tot+=parseInt(frm.elements[i].value);
}
document.getElementById(trg).value=tot-1;
}
</script>
Is there a way to add radio button values using HTML, I am making an eBay
listing and the Javascript isnt working for somereason...I saw an OnClick event somewhere but I cant find it...any help would be awesome thank you.