Hi,
I'm using the classic AJAX controls (as required by the project upon which I am working - not negotiable).
I have a CheckBox which, when clicked, calls a javascript method setPostalAddressInRed()
In that method, a the text of a RadComboBox needs to be toggled between red and black i.e. if checked, red, if not checked black.
Paraphrasing my code, I have this:
Unfortunately, that code is not working. It works for TextBoxes, but not RadComboBoxes.
Any help would be appreciated.
Cheers!
I'm using the classic AJAX controls (as required by the project upon which I am working - not negotiable).
I have a CheckBox which, when clicked, calls a javascript method setPostalAddressInRed()
In that method, a the text of a RadComboBox needs to be toggled between red and black i.e. if checked, red, if not checked black.
Paraphrasing my code, I have this:
setPostalAddressInRed() {
var
isChecked = document.getElementById(
'AddressInactiveCheckBox'
).checked;
var
postState = document.getElementById(
'StatesComboBox'
);
if
(isChecked ==
true
) {
postState.style.color =
'red'
;}
else
{
postState.style.color =
'black'
;
}
}
Unfortunately, that code is not working. It works for TextBoxes, but not RadComboBoxes.
Any help would be appreciated.
Cheers!