Something like this:
<input type="checkbox" id="x" onClick="ToggleInput(this, 'username');" >
<input type="text" id="username" >
<script language="javascript">
function ToggleInput(check, txtBox){
var txt = document.getElementById(txtBox);
txt.disabled = !(check.checked);
}
</script>
??
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"GMK" <x@x.com> wrote in message
news:eU**************@tk2msftngp13.phx.gbl...
dear all
i'm building an asp.net application i have on one of my pages a checkbox i
want that whenever the user checkd the checkbox to enable a textbox and
when the user uncheck the checkbox the textbox will be diabled.
i want to make those action on client side.
so if anyone could provide me the code i would be so thankful
thank you