PDA

View Full Version : reset radio buttons to unchecked


skalag
05-26-2003, 01:43 PM
hi, i have a form with text field and some radio buttons named "icon" with images attached...once user selects and sends message and icon i want to reset the form with JS....i have done this for the text field, but having no idea about JS i cant reset the "icon" radio buttons, can anyone help?

Danne
05-26-2003, 08:48 PM
try this:


<html>
<head>
<title> Título </title>
</head>
<script language="javascript">

function resetRdo() {
document.form1.rdo1.checked=false;
document.form1.rdo2.checked=false;
}

</script>
<body onload="">

<form name="form1">
<input type="radio" name="radio" id="rdo1" checked>
<input type="radio" name="radio" id="rdo2">
<input type="button" name="btnReset" value="Reset" onClick="resetRdo();">
</form>

</body>
</html>

skalag
05-26-2003, 10:29 PM
thanks danne