jsp request.getParameter is returning null in javascript
843836Mar 14 2005 — edited Dec 27 2007I have a javascript which calls a java method in jsp page. The problem is when i try to pass the input parameters to the java method, i am getting null values.
Here is the code.
<form>
First Name: <input type=text name="first" value="MYTEST"><br>
<input type="button" name="Find" value="Find" onClick="javascript:findValues();">
</form>
function findValues(){
document.form.submit();
<% String search = request.getParameter("first");%>
alert(<%=search%>);
<%!String result[]=retrieveData(search);%>
}
my problem is search string value is giving null. Can anyone please help?
Thanks in advance!!!
-JF