| | |
Problem related to JSP and Javascript
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 0
I have designed a Registration form with the help of HTML. Here in the tage <form> I have given the action to the JSP page. (e.g. <form name="form1" action="sample.jsp">) .
I have to validate this form bu javascript. The form is validated on clicking the Submit button of the form. But the problem is that here the validation is done but at the same time the form is directed to the next page i.e. to sample.jsp
I wish that the form must be directed to the next page when all the validation is successful and the user does not need to change anything on the form.
I have to validate this form bu javascript. The form is validated on clicking the Submit button of the form. But the problem is that here the validation is done but at the same time the form is directed to the next page i.e. to sample.jsp
I wish that the form must be directed to the next page when all the validation is successful and the user does not need to change anything on the form.
You need to control the form submission based on the result of the validation.
where
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<form name="frm" id="frm" action="action.jsp" onsubmit="return validate(this);"> <!-- form elements go here --> </form>
validate returns a true or false depending on the outcome of the validation. I don't accept change; I don't deserve to live.
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 0
Is the name of the function validate() here??
Plzz expplain it..
Plzz expplain it..
•
•
•
•
You need to control the form submission based on the result of the validation.
whereJavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<form name="frm" id="frm" action="action.jsp" onsubmit="return validate(this);"> <!-- form elements go here --> </form>validatereturns atrueorfalsedepending on the outcome of the validation.
![]() |
Similar Threads
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- Programming FAQ - Updated 1/March/2005 (Computer Science)
- html table cell coloring (JSP)
- AJAX : Am i right with the concept? (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: javascript for date using if condition
- Next Thread: Resize External Url In I-frame
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically browser bug calendar captchaformproblem cart checkbox child class close codes createrange() cursor date debugger dependent disablefirebug dom dropdown editor element embed engine events explorer ext file firefox form forms getselection google gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump libcurl maps masterpage math media microsoft object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post programming progressbar prototype redirect regex runtime safari scale scriptlets scroll search security shopping size software sql text textarea toggle unicode web website windowsxp wysiwyg \n






