File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Form Validation Help Needed Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form Validation Help Needed Please" Watch "Form Validation Help Needed Please" New topic

Form Validation Help Needed Please

Andy Home

Joined: Dec 05, 2006
Posts: 1
I am knew here so hi to everyone, I have been told by a friend that this site is particularly helpful so here goes.

I have a form that i want to ensure is filled out correctly before the user is able to proceed. I am also advised that Javascript is the easiest way to do this, however i have no idea how to implememnt it.

If the user fails to fill out the terms and conditions box with a "Yes"when the user clicks submit, i want a message to pop up to tell them to complete it.

and to return the user to that field for completion.

I honestly have no idea how to do this, can someone please help me.


Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Do a script validation in the form as below. Call the below function while clicking the submit button

Hope this helps

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Something like this:

However, instead of having a textbox asking for the user to type in Yes, ideally a radio button is used for the same.

[My Blog] [JavaRanch Journal]
I agree. Here's the link:
subject: Form Validation Help Needed Please
It's not a secret anymore!