On one of my web pages, there are two drop-down lists that interact in the following way:
- When something is selected from list 1,
- list 2 becomes enabled.
- After selecting an item from list 2,
- a button is then enabled.
I have been using autopostback on the drop-down lists to achieve this behavior. Below is the code snippet I am currently using to toggle the button's appearance:
if (ddlAvailablePrograms.SelectedValue != string.Empty)
{
careerInfoLearnMoreSubmit.Enabled = true;
careerInfoLearnMoreSubmit.Style.Remove("opacity");
careerInfoLearnMoreSubmit.Style.Add("opacity", "1.0;");
}
else
{
careerInfoLearnMoreSubmit.Enabled = false;
careerInfoLearnMoreSubmit.Style.Remove("opacity");
careerInfoLearnMoreSubmit.Style.Add("opacity", "0.5;");
}
This method works perfectly fine in Firefox. However, I am facing an issue in Internet Explorer where selecting an item in the first drop-down list causes the button to lose its greyed-out styling.
If anyone has any suggestions on how to address this problem specifically in IE, I would greatly appreciate it.
Thank you,
b3n