473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Validating Html form

Hi, i just want to know do u validate a form.

Ok, i just want to make sure that the user doesnt skip a textbox(fname), don't enter text in lets say 'zipCode' textbox. I am not trying to validate data against xlm file(am not onthat level yet!).

Expand|Select|Wrap|Line Numbers
  1. <p>
  2.             First Name&nbsp;&nbsp; &nbsp; 
  3.             <input id="firstName" style="WIDTH: 233px; HEIGHT: 23px" type="text" size="31" name="firstName" />  </p>
  4.  
  5. <input style="WIDTH: 92px; HEIGHT: 22px" type="text" size="12" name="zip" />
  6.  
Oct 23 '07 #1
1 1197
numberwhun
3,509 Expert Mod 2GB
Hi, i just want to know do u validate a form.

Ok, i just want to make sure that the user doesnt skip a textbox(fname), don't enter text in lets say 'zipCode' textbox. I am not trying to validate data against xlm file(am not onthat level yet!).

Expand|Select|Wrap|Line Numbers
  1. <p>
  2.             First Name&nbsp;&nbsp; &nbsp; 
  3.             <input id="firstName" style="WIDTH: 233px; HEIGHT: 23px" type="text" size="31" name="firstName" />  </p>
  4.  
  5. <input style="WIDTH: 92px; HEIGHT: 22px" type="text" size="12" name="zip" />
  6.  
Unfortunately there is not way to do this with HTML itself. What you are going to have to do is verify, using whatever script this form is being submitted to, that each required field is not null. You can do this with Perl, PHP, etc.

Regards,

Jeff
Oct 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: The Plankmeister | last post by:
Hi... What's the best method of validating input characters? I would like to prevent users submitting exotic characters (such as those acquired on Windows Systems by pressing ALT+) and thought...
3
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.