Topic: Dependent Dropdowns

How to create a drop down based on another dropdown like

pulldown1 => Country
pulldown2 => City
Pulldown3 => town

i came across this in cold fusion 8 by creating cold fusion components(cfc) but don't know in php

Assist Me in Creating This

Vote up Vote down

Re: Dependent Dropdowns

You might look into something like Son of Suckerfish.  I'm terrible with these menus, so I'll leave the explanation to someone else.  But this should give you a starting point.

Vote up Vote down

Re: Dependent Dropdowns

I think you are looking for some dynamic select elements using AJAX.

Either of the following appear to be quite good:

http://php-ajax-code.blogspot.com/2007/ … ities.html

http://www.chazzuka.com/blog/?p=206

I'm certain the others will also have a few to add.

Vote up Vote down

Re: Dependent Dropdowns

Stu1
Stu2

Vote up Vote down

Re: Dependent Dropdowns

But i Want to do this completely using dreamweaver, Php and My SQL  with out any readymade scripts

Vote up Vote down

Re: Dependent Dropdowns

Good Luck...

Vote up Vote down

Re: Dependent Dropdowns

khan.sikki wrote:

But i Want to do this completely using dreamweaver, Php and My SQL  with out any readymade scripts

Why? Readymade scripts are out there for a reason -- no sense reinventing the wheel, and it would save you a significant amount of time.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Dependent Dropdowns

By doing so i'll understand logic and get grip on subject

Vote up Vote down

Re: Dependent Dropdowns

Take a look here:

http://www.plus2net.com/php_tutorial/ph … n_list.php

doing a google search for this information may be a good starting point as well.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Dependent Dropdowns

ok please try this

<form name="form1">
    <select name="favs1" onChange="window.open(this.options[this.selectedIndex].value)">
    <option selected>Favourites</option>
    <option>-------------------</option>
    <option value="http://www.yahoo.com">Yahoo!</option>
    <option value="http://www.altavista.com">Altavista</option>
    </select>
</form>

i think this will help you
or
you need to explain you question.

Vote up Vote down