how to pass the javascript variable value to a jsp
Hi
I am trying to set a javascript variable with onClick event of a radio button in jsp
and I am assigning this variable to a hidden property in JSP whic has the corresponding getter an setter method in form.
But I am not able to retrtieve the value assigned in either form/action .can any body help me in this:
The code is
<script language="javascript">
var jais="";
function setValue(val)
{
jais=val;
}
document.o.value=jais;
</script>
<html:hidden property="o" value=""/>
<input type=radio name="1"
value="xyz"
onclick="setValue('XYZ')" >
ABC
and in the correspoding form bean I have
private String o_val =null;
public String geto()
{
return o_val;
}
public void seto(String strs)
{
o_val=strs;
}
In the action I am trying to access
by
1)String j=((form name)form.geto();
2)String j=request.getParameter("o")
but with both of them I am getting the value null
Thanks in Advance

