
i am having a problem that, i am having a combo box in the JSP page when i select an item from that i
am calling the onchange function.
In javascript i am getting the value now i want to pass this value to JSP scriptlet..

<html>
<script>
function selValue(){
var mytext = document.form.sel.options[document.form.sel.selectedIndex].text;
window.location.replace("pass.jsp?value="+mytext);
}
</script>
<form name="form" >
<select name="sel" id="sel" onchange="selValue();">
<option value="<-Select->"><- Select- ></option>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="Srilanka">Srilanka</option>
<option value="Japan">Japan</option>
<option value="Australia">Australia</option>
</select>
</form>
<% String st=request.getParameter("value");
if(st!=null){
out.println("value="+st);
}
%>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.