I am trying to display a DIV and disable a drop down box at the same time with a check-box. The code I have works perfect except when I unchecked the check-box, The drop down still stays disabled. I mean the DIV disappears fine but the drop down stays disabled. Anyone have a clue why?????
Form Name: OrderEntry
Dropdown Name: Consignee
Checkbox Name: chkcng
The dropdown is not inside of the DIV, It is directly above it. What i am tryign to do is, The dropdown is a list of customers, When the order is for a 1 time only customer, i was to disable the dropdown and display that div. everything works fine until i unckeck the checkbox.
Form Name: OrderEntry
Dropdown Name: Consignee
Checkbox Name: chkcng
The dropdown is not inside of the DIV, It is directly above it. What i am tryign to do is, The dropdown is a list of customers, When the order is for a 1 time only customer, i was to disable the dropdown and display that div. everything works fine until i unckeck the checkbox.
Code:
function hidedivcng() {
if (document.all.chkcng.checked) { // DOM3 = IE5, NS6
document.all.txtbol.style.display = 'inline';
document.OrderEntry.Consignee.disabled="true"
}
else {
document.all.txtbol.style.display = 'none';
document.OrderEntry.Consignee.disabled="false"
}
}