473,386 Members | 1,962 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.

where put date date validation function

hi sir,

I have following problem:

code goes here:
{code]
1.
<html>
2.
<body>
3.
Name:<input type="text" name="n1" id="n1">
4.
DOB: <select name="dd" id="dd"><option value="date">date</option>
5.
<option value="1">1</option>
6.
<option value="2">2</option>
7.
<option value="3">3</option>
8.
</select>
9.
<select name="mm" id="mm"><option value="month">month</option>
10.
<option value="jan">jan</option>
11.
<option value="feb">feb</option>
12.
<option value="mar">mar</option>
13.
</select>
14.
<select name="yyyy" id="yyyy"><option value="year">year</option>
15.
<option value="2007">2007</option>
16.
<option value="2008">2008</option>
17.
<option value="2009">2009</option>
18.
</select>
19.

20.
</body>
21.
</html>


javascript code goes here:
{code}
function date_validation()
{
var userDate=getElementbyId.....//i havn't idea how can get userdate after user selection
var today = new Date();

if (userDate <= today)
{
alert("future date not allowed");
}
else
{
//alert("uture date allowed");
}
}

how can implement this java script code and please help about helpfull code.

thank you.
Jul 22 '08 #1
1 1385
r035198x
13,262 8TB
Please do not start multiple threads for the same problem. Follow the advice given in your other thread
Jul 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
30
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
2
by: Ian | last post by:
I would like to have some validation on a date field. The date format is dd/mm which is used for our financial year end. I suppose I need also consider leap years. Please can you shed some light on...
8
by: dlx_son | last post by:
Here is the code so far <form name="thisform"> <h3>Enter time to add to or subtract from:</h3> (If not entered, current time will be used)<br> Day: <input name="d1" alt="Day of month"...
6
by: MickG | last post by:
Hi, I am trying to validate these values, this seems to work fine for the phone number and name but I am trying to get the program to fail to submit and set the focus on the date when 2006 is...
6
by: Jim Davis | last post by:
Before I reinvent the wheel I thought I'd ask: anybody got a code snippet that will convert the common ISO8601 date formats to a JS date? By "common" I mean at the least ones described in this...
6
by: RSB | last post by:
Hi Every one Need some help to Validate the Date i have in the Form. ALso how to Convert the Date Data i read from table to yyyy/MMM/dd format. Thanks RSB
7
by: James P. | last post by:
Hello there, In my asp.net page using VB, I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is greater than or equal to the...
3
by: pmarisole | last post by:
The following javascript code gives me the date validation that I need except after the correct date is entered into the field, it puts the date in the wrong format EXAMPLE: User enters...
8
pradeepjain
by: pradeepjain | last post by:
<script language = "Javascript"> /** * DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) */ // Declaring valid date character, minimum year and maximum...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: 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
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
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...

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.