Possible Duplicate:
Calling a server side function using a javascript
I’m trying to use the parameter from a Javascript function to call a static class in Java like so :
<script language="javascript" type="text/javascript">
function changeResp(ID,name)
{
var isChecked = document.getElementById(name).checked;
if(isChecked)
{
<%Finder.findByIdAndName(ID,name);%>
}
else
{
}
}
You cannot do that.
Javascript is on the client side (in your case) and Java is on the server.
You can set up some AJAX request to your Java server to run the function.