4 dynamic drop downs, any tutorial or link?

M

MiG

Hello all,

I want to make a dynamic 4 drop down menus with AJAX and PHP/mySQL, like
this:

Category->dynamic subCategory

County->dynamic cityCounty

Is there any good tutorial that can teach me how to do this? I managed
to have that Category dynamicly loads subCategory and that County
dynamicly loads cityCounty but I ran into a problem when I already
picked subCategory and than went on to pick a County, because of the
reload.this function in javascript my subCategory gets lost. Can anyone
point me in right direction?
 
E

Erwin Moller

MiG said:
Hello all,

I want to make a dynamic 4 drop down menus with AJAX and PHP/mySQL, like
this:

Category->dynamic subCategory

County->dynamic cityCounty

Is there any good tutorial that can teach me how to do this? I managed
to have that Category dynamicly loads subCategory and that County
dynamicly loads cityCounty but I ran into a problem when I already
picked subCategory and than went on to pick a County, because of the
reload.this function in javascript my subCategory gets lost. Can anyone
point me in right direction?

Hi,

If you have PHP and mySQL at your disposal, why bother using AJAX to
dynamically load the subcategories?
You can build the tree in PHP, and put that in the document, so JS can
use it.
I think.

Regards,
Erwin Moller
 
M

MiG

Erwin said:
Hi,

If you have PHP and mySQL at your disposal, why bother using AJAX to
dynamically load the subcategories?
You can build the tree in PHP, and put that in the document, so JS can
use it.
I think.

Erwin, I'm not sure what you think by stating that. What do you mean
building a tree? The thing is, I have to much subcategories and too much
cities to just throw them all to the user at once. That's why I wanted
to dynamically load sub values..
 
E

Erwin Moller

MiG said:
Erwin, I'm not sure what you think by stating that. What do you mean
building a tree? The thing is, I have to much subcategories and too much
cities to just throw them all to the user at once. That's why I wanted
to dynamically load sub values..

Ok, I didn't know that.
So you are stuck with an Ajaxoid approach.
(Consider my previous posting invalid.)

And sorry, I cannot help with your menu-logic, don't know how that thing
works.

Good luck.

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top