Hello All,
I have some form radio buttons and have linked a text field (disabled) to enable when the radio called "purchased_other" is clicked on - then the user can enter whatever data they need....
However... if the text field is enabled and some text is entered, and the user changes their mind and clicks another radio the field is disabled - but the entered data stays there....
Is there a way to have the field "clear" whenever any other radio is clicked on? - I tried to use a form.elements [purchase_other].disabled = clear; and some other different variations but it didnt work - is this possible?
<tr valign="top">
<td>About your new home purchase?<BR>
<span class="core">
<input type="radio" name="purchase" value="Cash Purchase" onClick="this.form.elements['purchase_other'].disabled = !this.unchecked;">
</span> Cash Purchase<BR>
<span class="core">
<input type="radio" name="purchase" value="Financing" onClick="this.form.elements['purchase_other'].disabled = !this.unchecked;">
</span> Financing<BR>
<span class="core">
<input type="radio" name="purchase" value="Other:" onClick="this.form.elements['purchase_other'].disabled = !this.checked;">
</span>Other: <input type="text" class="form" name="purchase_other" size="20" disabled="disabled" /></td>
</tr>
I have some form radio buttons and have linked a text field (disabled) to enable when the radio called "purchased_other" is clicked on - then the user can enter whatever data they need....
However... if the text field is enabled and some text is entered, and the user changes their mind and clicks another radio the field is disabled - but the entered data stays there....
Is there a way to have the field "clear" whenever any other radio is clicked on? - I tried to use a form.elements [purchase_other].disabled = clear; and some other different variations but it didnt work - is this possible?
<tr valign="top">
<td>About your new home purchase?<BR>
<span class="core">
<input type="radio" name="purchase" value="Cash Purchase" onClick="this.form.elements['purchase_other'].disabled = !this.unchecked;">
</span> Cash Purchase<BR>
<span class="core">
<input type="radio" name="purchase" value="Financing" onClick="this.form.elements['purchase_other'].disabled = !this.unchecked;">
</span> Financing<BR>
<span class="core">
<input type="radio" name="purchase" value="Other:" onClick="this.form.elements['purchase_other'].disabled = !this.checked;">
</span>Other: <input type="text" class="form" name="purchase_other" size="20" disabled="disabled" /></td>
</tr>