JavaScript/jsp help-how to refersh page after an option is selected in drop down menu
in a jsp page...there is one drop down menue that gets the velues from the detabase(this works okie)....i need to do a javascript code to refersh the page right after the user selects one of the options...and the page gets the selected value and base on that, will look into databse to disply the requried text....
here is the code i have done..but it dosnt work,,,
<SCRIPT LANGUAGE="JavaScript">
function OnChange(dropdown)
{
//addCar.jsp is the jsp page
var myindex = dropdown.selectedIndex
var SelValue = dropdown.options[myindex].value
var baseURL = "addCar.jsp?selected="
top.location.href = baseURL+dropdown.options[myindex].value;
while(i1.hasNext())//another iterator to get the next data and just display in the page
{
//jsp code
String yearModel1=prostaDTO.getYear();
%>
<td><%=yearModel1%></td>
<input type="hidden" name="yearModel" value="<%=yearModel1%>">
<% } %>
so basicly i just need the selected value to use it to disply the year...tanx in advanceeeee
hi friend i need ur help to solv my prob.... I hav jsp page where there is a combo box while loading the page itself that combobox has to get the data from data base and while selecting the particular item it has to show the item details .... I think u got my point.... Plz paste the code what ever u hav for that........ in u problem u hav done dis.......... waiting 4 ur reply........
Bookmarks