Closed Thread Icon

Topic awaiting preservation: I'm not too sure what to call what I'm asking for here... (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic awaiting preservation: I&amp;#039;m not too sure what to call what I&amp;#039;m asking for here... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: I&#039;m not too sure what to call what I&#039;m asking for here... <span class="small">(Page 1 of 1)</span>\

Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 03-12-2003 01:08

Hey guys...been a very long time since I last posted in here...but I'm having a bit of a problem with a script I'm writing. I'm writing it in PHP, but part of the script is a HTML form that I need to hook a bit of Javascript into. There's a part of the form when the user selects a date, and I know the people who are going to be using this...they will try and tell the system that something took place on the 31st of February.

Now, I could validate this form with PHP on submission, but I've also been told that using Javascript you can alter the contents of one form field based on the selection of another. So if they select September, April, June or November from the month drop-down list, the day drop-down list changes so that they can't select the number 31 from it, or if they select February then the numbers 30 and 31 become unavailable.

Now, as I said, I can do this after submission with PHP, but I'd also like to see if I can how it's done with javascript, and then do it whichever way is easiest.

Thank all.

Maniac (V) Mad Scientist

From: the bigger bedroom
Insane since: Oct 2000

posted posted 03-12-2003 04:51

hi skaarj,
2 things:

1 - this script does what you were asking for. if i have time, i'll show you how it can apply to your problem.

2 - javascript form validation is a useful thing. maybe you should look at that as an option, too.

« BackwardsOnwards »

Show Forum Drop Down Menu