javascript-php -> SELECT boxes
| From: | Siim Einfeldt aka Itpunk | Date: | Thu, 16 Nov 2000 21:37:01 +0000 |
| Subject: | javascript-php -> SELECT boxes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25793@lists.php.net to get a copy of this message | ||
Hi folks
Need some javascript-php help, maybe even some little code. the situation
is the following
I have select input eg
echo "<SELECT name=year><OPTION value=''>Choose";
for($y=1995;$y<=2005;$y++){
echo "<OPTION value='$y'";if($year==$y){echo "SELECTED";}echo
">";
}
echo "</SELECT>";
And continuing in the same manner I have month and day dropdowns as
well. And actually I have the same type of fields on the next line as well
(only different names).So it would look like:
dateone : day month year
datetwo : day month year
What I need, is when dateone has been selected (in other words, none of
the columns are ''), then datetwo fields would be given (shown) exactly
the same values. And now the most important part, when user starts to
select datetwo now, then he shouldn´t have the possiblity to select
earlier date that datetwo, that should be forbidden. As one is actually
contract start date and the second is contract end date,this is important
to get to work like that.
Now, the question is, how would it be possible? I think I could use some
kind of code...it would probably be the most helpful as I`m far from a
javascript genius.
Thank you in advance,
Siim Einfeldt