I am having a similar problem.
I would like to pass a java variable as a parameter in to a onKlick event handler javascript function. How do I do that?
<html>
....
.
..
.
<script>
function enable(value){
alert(value);
}
</script>
<%
int i=89;
%>
<input type=checkbox name="chkBox" onKlick="enable(<%=i%>);"
How do I pass the value of i to the enable function?
Please help.
Hi I have resolved my issue to get the value in a javascript but I dint know whether it is the best way to that or nat.
I am giving the approach.
1.Taken the java variable and assign it the value
2.Now i have assigned this value to the Hidden parameter of the form
3 And from the javascript function i used the value of this parameter.
In my case it works fine...
Please suggest whether any other approach can be possible