I want to keep the one drop down active at a time in the form. When the page loads, one DD will be active and other will remain disabled. When I click on Disabled DD, it will get active while and the first DD which was enabled will turn to Disabled and vice a versa. So that user can submit the value for one DD only.
Can someone please help me with the code for this?
Below is the code I tried. I am calling this method on onblur and onfocus event of the DD component. However it doesn't work as expected.
I had tried this option already. With the following code, when the page loads first time, both the DDs are enabled, that is fine. When I click one dropdown, other one get disabled. However, I also want it working working vice-versa.
It means if the user changes his mind to change the select option, he should be able to enable the disabled drop down and this time first DD will get disabled then.
So if we quick DD1, DD2 will disable. If we again click DD2, it will enable back and disable DD1.
Is it possible?
When the dropdown is disabled, how do you expect it to get focus? You can not focus it.
Joined: Jul 21, 2011
I've created a small POC.
On page load, both multiboxes are enabled. The moment mouse moves over a particular multibox, the other one gets disbaled. This will work only for the first time when the page loads and both are enabled.
After that the user can click on the link to enable the corresponding multibox.
Here's the code
Try this out and do let me know if any additional help is required.
This is awesome Renu. This is working perfectly fine.
I was thinking not to add additional component to just handle the enable/disable logic, hence I didn't think in that direction. I was guessing if there is any way to execute the event on disabled component that I might not know. And this is the right forum to get the experts advice.