Hey. What I need to do is, there's a dropdown list. When someone clicks something in the dropdown list, something happens.
for example:
country (field 1)
city (field 2)
If user selects country, city related to selected country should automatically come into city field.
I request to give me a little example here.
dyanmic drop down list (without my_sql)
Moderator: General Moderators
dyanmic drop down list (without my_sql)
Sir, actually my english is also not good so may be not asked corretly.feyd wrote:You're looking for a chained select. This is a client-side functionality, not PHP.
Search through our various boards for the phrase.
i can give you a example http://www.bestessays.com/order.php where when you'll select "TYPE OF DOCUMENT", some below fields data will be changed.
like if you'll select THESIS, "COST PER PAGE" will be changed.
can you kindly help me out. sir, i'm tyring for a week but still not got how to do.
pl help me.
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
As feyd was saying, this sort of functionality requires javascript.... search these forums for "chained select" or check out google
isn't there any alternate way in PHP?aaronhall wrote:As feyd was saying, this sort of functionality requires javascript.... search these forums for "chained select" or check out google
pl help me out.
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
There are two ways of doing this...
1) Reload the page when the first "select" is changed either through javascript or a "find" button.
2) Load all possibilities and handle through javascript
2) Use Ajax (recommended) with fallback option. An example shown in viewtopic.php?t=60287
1) Reload the page when the first "select" is changed either through javascript or a "find" button.
2) Load all possibilities and handle through javascript
2) Use Ajax (recommended) with fallback option. An example shown in viewtopic.php?t=60287
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA