CheckBox Problem - Please reply ASAP
Reply
![]() |
|
|
From:
Balu
|
Hi, I am facing problem in enabling and disabling checkboxs (webserver controls). My requirement is onclick of One checkbox I have to enable the Other checkbox which will be disabled initially. I am calling a _javascript_ function on click of Checkbox1 and in the script I am enabling the checkbox2 but it is not getting enabled. Any pointers in this regard will be highly appreciated. Aspx code <td width="75%" style="HEIGHT: 19px"> <asp:CheckBox ID="chk1" Text="" AutoPostBack="false" title="Will You need a translator for your engagement (charges may apply)" Runat="server" tabIndex="10" Enabled="True"></asp:CheckBox> </td> | <td width="75%"> <asp:CheckBox ID="chk2" Runat="server" tabIndex="10" Enabled="False"></asp:CheckBox> </td> CodeBehind this .chk1.Attributes.Add("onclick","TranslationRequiredChecked();"); _javascript_ Code function TranslationRequiredChecked() { var objTranslationRequired = window.document.getElementById(chk1); var objRedmondTranslatorRequired = window.document.getElementById(chk2); var objcboLanguage = window.document.getElementById('cboLanguage'); var objtxtLanguage = window.document.getElementById('txtLanguage'); if(objTranslationRequired.checked == true) { chk2.disabled = false; chk2.checked = false; objcboLanguage.disabled= false; objtxtLanguage.value=""; objtxtLanguage.disabled= true; } else { chk2.checked = false; chk2.disabled= true; objcboLanguage.disabled= true; objtxtLanguage.value=""; objtxtLanguage.disabled= true; } } Regards, Bala
|
|
View other groups in this category.
![]() |
To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.
Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.
If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.
|
|