Hi all, I'm trying to pass a string from a javascript function into jsp all on the same page. I'm not sure how to go about this. Would it be something like?
I'm not sure what to do
Code:
<html>
<head>
<form name=frm>
<input type="hidden" name="variable" value="???">
<script type="text/javascript">
function myfunction()
{
//statements here
}
</head>
<body onLoad="myfunction()">
<%
String var = request.getParameter("variable");
...
%>
</form>
</body>
</html>
I'm not sure what to do