Hello,
I am trying to achieve the following:
There is a
jsp page with 3 fields. 2 of them are drop-down select fields (Target Audience & User). User field is initially disabled. Only if the Target Audience field has a pre-defined value selected will the User field become enabled. But the moment it is enabled, it should dynamically fetch a list of all users defined in the system from the database and display it in the dropdown. Finally, this entire jsp has to be submitted as a
Struts form and invoke a Struts action.
I'm stuck with how to retrieve the list of users from the db and display it. Should that be done via an action invocation? If yes, then how do I invoke the action, because there is no requirement to click a button or something. The ideal way seems to be to somehow invoke the action from within the javascript that I am using to enable the User field.
Or is there a better method?
My application is using Struts 1.
Your ideas and suggestions will be of great help. Thanks!!!