Forum Moderators: coopster

Message Too Old, No Replies

Drop down list options changed by another drop down list

         

internetheaven

2:20 pm on Dec 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible in PHP to accomplish the following:

User selects an option from a drop down list that changes the options available in a second drop down list underneath. Based on the selection from the second drop down list when the user clicks the "Go" button they are taken to that page.

Is javascript the only way to accomplish such?

Thanks
Mike

coopster

2:39 pm on Dec 27, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If you want all the action to occur in the user's browser without a round-trip back to the server, then yes. Otherwise, you would display the first drop down and wait for a selection. Once selection is made your form submits to the server where you process and set up the next drop down and send the response back, waiting for input once again.

eelixduppy

8:08 am on Dec 28, 2007 (gmt 0)



Not sure if you want the second dropdown populated from a database, but if you do I created a little script with AJAX and PHP to do the job in this thread: [webmasterworld.com...]