i have created a button on its onclick() event i call a method
<script type="text/javascript">
validate()
{
.....
window.location='reg.jsp';
}
</script>
it doesn’t take any value of the textbox to the reg.jsp page
If i use <form action="reg.jsp" method="POST"> it takes the value of textbox to the next page but i can’t do the things which are to be executed in validate() method
provide a solution which may help to redirect to next page with value of textbox
Use
<form action="reg.jsp" method="POST">and callvalidate()functiononsubmitof your form.Return true if form is valid else return false.Returning false fromvalidate()will prevent your form from being submitted.