I have a site that has two radio buttons. One is for a date field but if they put a date in it and then decide to select the other field I want the first field to clear. I've tried several different ways to do it but can't get it working right. This is one of the ways I've tried:
<input type="radio" value="ExpirationDate" checked name="ExpirationDate">Expiration Date <input type="text" name="Expire_Date" size="10" >
<script language='javascript'>
<!--
(Code for calendar)
//-->
</script>
<input type="radio" value="Permanent" name="ExpirationDate" onClick="ClearField();"/>Never Expire
<script language="JavaScript">
<!--
function ClearField() {
document.newform[Expire_Date].value = "";
}
}
//-->
</script>
Thanks,
Debbie
<input type="radio" value="ExpirationDate" checked name="ExpirationDate">Expiration Date <input type="text" name="Expire_Date" size="10" >
<script language='javascript'>
<!--
(Code for calendar)
//-->
</script>
<input type="radio" value="Permanent" name="ExpirationDate" onClick="ClearField();"/>Never Expire
<script language="JavaScript">
<!--
function ClearField() {
document.newform[Expire_Date].value = "";
}
}
//-->
</script>
Thanks,
Debbie