File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Form validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Form validation" Watch "Form validation" New topic
Author

Form validation

Yatin Shah
Ranch Hand

Joined: Sep 11, 2004
Posts: 72
Hello,

I am trying to validate my html form using javascript. It is validating properly. after validation I am calling servlet page on that basis of that html page. My problem is, it is showing alert message is there is any field is missing and calling servlet page too with error. I want to be on html page if there is any field is missing. Can any one help me? Please find my code as follow:

[Edit: the code that was originally here has been removed by the author.]
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

Which alert message is showing? There are many in your script.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Yatin Shah
Ranch Hand

Joined: Sep 11, 2004
Posts: 72
It showing message corresponding missing filed. and after clicking on ok button it execute servlet. I want it should be on same html page focusing that missing filed.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16624

Bear Bibeault wrote:Which alert message is showing? There are many in your script.


What script? I don't see any script posted. I think your eyes are going. ;)

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

The original poster has removed the code from his original post.
 
 
subject: Form validation
 
Threads others viewed
session management problem with iframes
database best practice
please observe this snippet
validation problem in jsp
Struts 2 JCaptchaforStruts 2 issue
IntelliJ Java IDE