I am using JSTL to populate one dropdown based on the selection of the other dropdown
Here is what i did:
In the form element tag i have a drop down named manufact that gets populated(and works correctly).But i would like to get the selected value of this dropdown and
populate the second drop down named providedfor.I have used the window.location.reload which reloads the form.But i don't understand why the <sql:param> tag does not get filled with the value of the
param.manufact ( as shown by numbering (1) and (2).Is there any mistake? Please help
Thank you bear bibeault,
but i am a newbie to ajax and i am not clear in its concepts.Could you please tell me how to do it with JSTL and SQL tags.To be the minimum how would you save a particular form element after it is getting reloaded so that i can use it in my (2) as mentioned in my previous post.Sorry that i do not know ajax and it is not an issue if my form gets reloaded.Please help me to fix it...
The SQL tags are not intended for production use and I do not think you should be relying upon them.
If you want to use a pure JSP solution (rather than Ajax), that's fine (just less efficient), but you should do so by following best practices and sequestering any DB access to Java model classes.
If Ajax is one step too high and you want to do it all asynchronously, then just print all possible options out into a Javascript array variable and use Javascript to populate the dropdown.