By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,814 Members | 2,162 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,814 IT Pros & Developers. It's quick & easy.

where put date date validation function

P: 21
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
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
Please do not start multiple threads for the same problem. Follow the advice given in your other thread
Jul 22 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.