I have two html dropdown controls on an php intranet project. How can I get the second one to change when the user makes a new selection from the first one without changing the current screen context please?
For example, the first select list is, say,
short box
long box
big box
small box
and the second select list for the first item (short box - the default) is
red
blue
green
but by selecting 'long box' from the first select list the second select list is now
black
purple
yellow
orange
without the rest of the screen changing.
Dynamic dropdown without changing context
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Dynamic dropdown without changing context
This would be done client side, with Javascript. I am drawing a complete blank on the name of the process you are asking about, but essentially you are using the selected index of one form element to control the content of another form element.
-
devendra-m
- Forum Contributor
- Posts: 111
- Joined: Wed Sep 12, 2007 3:16 am
Re: Dynamic dropdown without changing context
refer http://www.hotandco.com
when you select netherlands in country field , city field will be loaded with cities in netherlands. You need ajax for that.
when you select netherlands in country field , city field will be loaded with cities in netherlands. You need ajax for that.
Re: Dynamic dropdown without changing context
Many thanks fo the replies.
I have solved the problem by using dynamic php to create Javascript menus on the fly from the SQL Server 2005 database.
Works nicely.
I have solved the problem by using dynamic php to create Javascript menus on the fly from the SQL Server 2005 database.
Works nicely.