I am retrieving the selected item from a list/menu component on an
HTML page. The said value is passed as a parameter to a method
initiated through <jsp:useBean.
I am aware that when the user selects an item from the list/menu an
onChange event is triggered. I have handled this event by a javascript
function.
The issue is that a table is populated according the the selected
item, and therefore I cannot add the code to create the table at the
function. I need to retrieive the data from the database through the
mapping with the class declared in <jsp:useBean and then pass the
value loaded from the selected list/menu.. but I am failing to arrive
to this part.
Any suggestions of how I can make this working?
Kind regards
I might found the solution or at least I managed to retrieve the data
from the database. Now I have an an issue with how I can pass a
parameter retrieved with a javascript function but passed to the
method defined in the scriplet as per example
col1.innerHTML="<%=outResult = result.getResult(" + selectedText + ")
%>"; I have retrieved a value from an HTML component and stored in the
variable selectedText. It seems that the scriplet can't understand the
varaible as the variable outResult is returned null. On the other hand
if I replace variable selectedText with a string "abc" for example I
have the results I expected.
My question is - how can I pass a variable in order to retrieve the
data dynamically?
Thanks