473,386 Members | 1,598 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,386 software developers and data experts.

Validations to be considered for writing script for date of birth in a form

i need your help for writing javascript for date of birth.in dis we are using seperate drop down menus for date,month and year.....so wat are d validations to b considered 2 overcome dis.......
Mar 31 '07 #1
4 3778
AricC
1,892 Expert 1GB
i need your help for writing javascript for date of birth.in dis we are using seperate drop down menus for date,month and year.....so wat are d validations to b considered 2 overcome dis.......
If you are getting the values from drop downs then you shouldn't have too much too worry about. Dont give them the option for dates that you know possibly couldn't be reasonable like 01/01/1901 unless you have some really old people visiting your page.
Mar 31 '07 #2
This is the html code i hav used for the date of birth
now my aim is that when v submit the form the date,month and year fields
should not be empty
can u plz provide me the necessary function
i mean script
thanq






Date of Birth :
<select name="month" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">Jan</option>
<option>Feb</option>
<option>Mar</option>
...........................
</select>
<select name="date" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">1</option>
<option>2</option><option>3</option>
............................</select>
<select name="year" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">1955</option><option>1956</option><option>1957</option>
.....................................
</select>
Mar 31 '07 #3
acoder
16,027 Expert Mod 8TB
This is the html code i hav used for the date of birth
now my aim is that when v submit the form the date,month and year fields
should not be empty
can u plz provide me the necessary function
i mean script
thanq
Check out these tutorials/articles:
Form Validation- Apple
Form Validation - W3Schools
Form Validation - doing it right
Apr 2 '07 #4
acoder
16,027 Expert Mod 8TB
Also check this date validation script.
Apr 2 '07 #5

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

Similar topics

20
by: Gav | last post by:
I have a database with date of births stored dd/mm/yyyy (english dating system) and =date() returns a date in the same format in my server. how do i find the persons age using these two pieces of...
2
by: anil kumar via .NET 247 | last post by:
(Type your message here) hi, i am using save & cancel webform button my webpage to with somevalidations , when i am trying to save my content it is savedthat time i need a popup msg like ur 'data...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
7
by: php newbie | last post by:
I am creating a form Form1.php that posts to the another form Form2.php. I have input validations on the first form. I need the user to go to the next form ONLY if the inputs from the user are...
7
by: Naha | last post by:
Hi guys, I have a problem, can someone help me? I'm not sure why but none of my validation functions are working!!!! <html>
2
by: prakashsurya | last post by:
Hello I am going through the validations in a form I would like to know the validations to be considered in writing javascript for email id so would u plz help me in writing the necessary...
2
by: Matuag | last post by:
Hi All, I am trying to create a form which can calculate with Age and Birth Date fields. I want Age to be calculated based on Birth Date (which I managed to do) but at the same time if Birth...
3
by: jamieharrop | last post by:
Afternoon all, I've been battling with this all day today and my brain is now pretty much fried. I have one table that lists several details about my customers (name, address, phone, date of...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.