JSHINER Posted September 22, 2006 Share Posted September 22, 2006 I believe this is done with PHP...I want two form fields, first, a State Selection, so you choose a state. Then dependent on the state you choose, the next field, Towns, has the list of towns for that state. I have all the states/towns already, I just need the basic code to perform that action. Also, when you select a Town I want it to automatically link to a specified link.Any help / pointers in the right direction would be much appreciated.Thank you! Quote Link to comment Share on other sites More sharing options...
steveclondon Posted September 22, 2006 Share Posted September 22, 2006 No it isn't really php it is Javascript that you need. The user will select in the first and you need javascript to update the second. You will have to pre-load all of the towns when the page loads unless you use AJAX which is a combination of php and style sheet and javascript. This way by using an invisible frame you can use a get to query the database return only the towns you need and use javascript to pull the list into the next select. It is quite a long and difficult proccess if you haven't done it before. Quote Link to comment Share on other sites More sharing options...
JSHINER Posted September 22, 2006 Author Share Posted September 22, 2006 Thanks for the info... I'll give it a go. Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted September 22, 2006 Share Posted September 22, 2006 Have a look at the Ajax implementation of your request at Chained Select Boxes at [url=http://www.dhtmlgoodies.com/index.html?page=ajax]http://www.dhtmlgoodies.com/index.html?page=ajax[/url]. See also the demo at [url=http://www.dhtmlgoodies.com/scripts/ajax-chained-select/ajax-chained-select.html]http://www.dhtmlgoodies.com/scripts/ajax-chained-select/ajax-chained-select.html[/url]Ronald 8) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.