I am using Struts and jQuery for one of my web applications. In one of the screens, some elements need to be disabled based on certain conditions. For ex, If a val of variable test is "Employee", then a drop down box (select box in struts) should be disabled. User should not be allowed to select a value. System will assign a value based on the value in variable test.
I tried to use the following options.
I used the method attr to set the values. The disabled attribute makes the dropdown non-editable, but the values are not set into the struts bean and so the values are not available in the Action class. The last 2 options did not make the drop down non-editable.
How to make the struts elements like select box, check box non-editable in jQuery on conditional basis?