473,509 Members | 7,333 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

29 New Member
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 3782
AricC
1,892 Recognized Expert Top Contributor
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
prakashsurya
29 New Member
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 Recognized Expert Moderator MVP
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 Recognized Expert Moderator MVP
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
11793
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
3297
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
5855
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
1370
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
1455
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
1574
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
1203
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
3378
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
2996
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
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
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
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
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...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.