Forum Moderators: coopster

Message Too Old, No Replies

Best way to display many selection options

         

nuwanda

2:18 am on Dec 3, 2005 (gmt 0)

10+ Year Member



Hi

Let's say I want my members to choose the state, county & town they live in.

I could present a huge list box for them to select from but it would contain literally hundreds of items. That seems excessive.

It would probably be better to present the states, counties & towns as levels in a heirachy of choices. That is, you choose your state, then get shown a list of counties, then you choose your county then you get shown a list of towns in the that county.

I could do that with a series of pages or reloads of the same page but surely there must be a more elegant way to do it.

Must I use a javascript function for this or can someone suggest a pure php/html method?

Thanks in advance.

Ross

dreamcatcher

1:11 pm on Dec 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi nuwanda,

What you are looking at here is Javascript. As PHP is server side, you can`t simply display another drop down without refreshing the page in some way. ie, a command must be sent to the server for PHP to respond.

Try posting in the javascript forum.

dc