Anyone know javascript and can help me out?
Code that don't work:
<script language="JavaScript" type="text/javascript">
<!--
function input() {
if (document.setup.a_account.value='yes') {
document.setup.a_username.disabled=false
} else {
document.setup.a_username.disabled=true
}
}
window.onload=input
-->
</script>
Setup is the form name, accoount is the name of 2 radio buttons(one with the value "yes" and one with the value "no") and a_username is the name of a text field(not textarea). What I am TRYING to do is, when the radio button with the value yes is selected I want to enable the text field and when the radio button with the value no is selected, I want to disable the text field! Can anyone help? Thanks