I use three drop-down lists that are interdependent.
The user must select the first drop-down list. Accordingly, the second list will be populated.
Then again the user will select the second drop-down list, then the third list will be filled.
In the third drop-down list, select the result. For the whole dropdown, I use Ajax. But for the last dropdown, I use action , so I need to submit the form.
As soon as the form returns after the search result. Results - this is the population properly.
But the last two drop-down lists are not populated with the selected value.
So, for this, I assign a value while loading the page below
document.getElementById("laneid").text = '<%=laneID%>';
I tried this too
document.getElementById("laneid").value = '<%=laneID%>';
To return from the action, I call ajax to populate all the dropdown values. the values ββare in the query variable '<%=laneID%>' .
Please help me keep the values.
I think jQuery might help in this case. but if there is any other solution for this, please suggest.
Thanks a ton.
source share