Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Form validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
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 ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56215
    
  13

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: 17234
    
    1

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 ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56215
    
  13

The original poster has removed the code from his original post.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Form validation
 
Similar Threads
database best practice
session management problem with iframes
validation problem in jsp
please observe this snippet
Struts 2 JCaptchaforStruts 2 issue