Hello to All,
how we can send post method form fields by hyper link to a servlet?
Ex: <form method=post action="/abs ">
<INPUT type="text" name="firstname" >
<INPUT type="text" name="lastname" >
<a herf ="xyz">
<a>
</form>
Printable View
Hello to All,
how we can send post method form fields by hyper link to a servlet?
Ex: <form method=post action="/abs ">
<INPUT type="text" name="firstname" >
<INPUT type="text" name="lastname" >
<a herf ="xyz">
<a>
</form>
<a href="servlet" onclick="submitForm()" /a>
here in the javascript function submitForm()
submit the form
eg:
form1.action = servletpath;
form1.target = "_none";
form1.submit();
this will submit the form and you can grab the value into the servlet.