Forum Moderators: coopster

Message Too Old, No Replies

drop down box onchange call php function

         

Superbuis1

12:56 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



Hello!

I have 2 drop down boxes. The second depends on the selected value of the first. It both should contain date values. I've writen a php function that calculates 10 dates starting from the current date. When the user selects a date, 10 new dates should be calculated starting with the selected date and shown in the second drop down box. So my actual 2 questions are:
- I know this is a typical Javascript issue, but we rather do not use this. Is it possible in php?
- if so, how do I get the selected value in php without doing a post. Because otherwise my complete form will be submitted. Or is it perhaps possible to use a form in a form? Never done that either?

Thanks!

Superbuis1

1:42 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



Sorry... forget about the form part. Solved that. My mistake.... it's no problem for me to use this.form.submit() or something like that (if necessary)

jatar_k

4:10 pm on Apr 9, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It is possible in php but, since it is a server side language, once you select a value in the first drop down you would have to submit the page for php to be able to act on the information.

If you want the change to occur with out submitting then I would go with js.