This is JSP code, here simple selection option of a form. When I press submit button after selected an option, I can print the selected property in the action file.
<td>
<html:select property="hotel" name="SearchParamsForm">
<html:option value="X">Right</html:option>
<html:option value="Y">Left</html:option>
</html:select>
</td>
But I want to print that property value in the script tag(X or Y). Can any one help me to do this?
<script>
function gethotel() {
//print selected option (X or Y)
}
</script>