-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: true-developer
Message 2 in Discussion
Hi I have three check boxes on my asp.net page. I am using asp.net server controls
on that page. Third check box is dependent on first two i.e if any check box from
first two is checked third check box will be disabled. If we uncheck first two check
boxes then third one should be enabled. I have written a java script code and that is
working fine except for the case in which I have disabled the third check box in the
server side code. Is there any solution to this problem or it is the limitation of
asp.net server controls. Here is my asp.net code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'Put user code to initialize the page here
CheckBox1.Attributes.Add("OnClick", "Test();")
CheckBox2.Attributes.Add("OnClick", "Test();")
Me.CheckBox3.Enabled = False
End Sub
and here is java script code
function Test(){
if (document.Form1.CheckBox1.checked == true ||
document.Form1.CheckBox2.checked==true) {
document.Form1.CheckBox3.disabled = true;
}else if (document.Form1.CheckBox1.checked == false &&
document.Form1.CheckBox2.checked == false)
{ document.Form1.CheckBox3.disabled = false; }
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
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.
mailto:[EMAIL PROTECTED]