Hi,
I have a form in a
JSP, this form has 2 combo boxes. the second combo box will be empty until the user choose a value from the first combobox.
so I have the select tag as follows in the jsp
<select name="country" id="firstBox" onchange="retreiveSecondList()">
<option value="" SELECTED>
......
</select>
and defined a js function
function retreiveSecondList(){
firstBox = document.getElementById('firstBox');
//Nothing selected
if(firstBox.selectedIndex==0){
return;
}
selectedOption = firstBox.options[firstBox.selectedIndex].value;
url="/BS/RegisterServlet?selectedOption="+firstBox.selectedIndex;
}
how can I send a request through this method having the selected index from the first combobox?
i have tried
req = new HttpServletRequest();
req.open("GET", url, true);
req.send();
but it s not working!!!
anyone has any idea about that?