I have had a look at numerous other threads on here that have a similar problem but have been unable to resolve my issue. I'm using the following code for my combobox:
<sq8:ComboBox runat="server" ID="cboAgree"><Items>
<sq8:ComboBoxItem runat="server" Text="Agree"></sq8:ComboBoxItem>
<sq8:ComboBoxItem runat="server" Text="Disagree"></sq8:ComboBoxItem>
</Items>
</sq8:ComboBox>
<sq:BindableControl runat="server" TargetControlID="cboAgree" DataField="Agreement"></sq:BindableControl>
I want to get the value selected (either "Agree" or "Disagree") and use that as a condition to hide/unhide a grid on my form:
if (value == "Disagree") {
commentsGrid.style.visibility = "visible";
}else{
commentsGrid.style.visibility = "hidden";
}
I've tried a number of things but it seems like the problem is to do with the way the form loads and the combobox doesn't have a value at that point. I always get an error that my comboBox "cboAgree" is null.
Could anyone advise?