•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 430,114 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,225 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 785 | Replies: 1
![]() |
•
•
Join Date: Apr 2006
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
I have searched the forum for a similar problem but have been unable to find anything.
What i am trying to achieve is a dropdown menu which behaves in the following way:
1, Someone selects an category from the first dropdown menu
2, if the category has subcategories then dynamically create a new dropdown underneath and in the process fill it with the subcategories from the chosen option in the first menu.
3, keep doing the above until there are no more subcategories for the chosen option.
I have a demo setup at http://evolvenet.co.uk/dd/subcats.php
There is a small bug in the code which does not completely clear all submenus from the page when you go up the chain and select an option from the first menu... follow the below steps to see what i mean:
1, select "UK Local" from the first dropdown
2, select "Accountants" from the dynamically created dropdown, a dropdown containing "England, Scotland, Wales, N.Ireland" will appear dynamically
3, select "UK Online" from the first dropdown
Now after step 3 you will notice that the dynamically created downdown containing "England, Scotland, Wales, N.Ireland" is still present when it should ideally disappear from the page (it was generated by clicking "UK Local" and is not a sub category list of "UK Online")
Hopefully someone can understand the above, if i didnt make something entirely clear please ask questions and i will try to explain further.
will appreciate any replies.
thnx
rg
I have searched the forum for a similar problem but have been unable to find anything.
What i am trying to achieve is a dropdown menu which behaves in the following way:
1, Someone selects an category from the first dropdown menu
2, if the category has subcategories then dynamically create a new dropdown underneath and in the process fill it with the subcategories from the chosen option in the first menu.
3, keep doing the above until there are no more subcategories for the chosen option.
I have a demo setup at http://evolvenet.co.uk/dd/subcats.php
There is a small bug in the code which does not completely clear all submenus from the page when you go up the chain and select an option from the first menu... follow the below steps to see what i mean:
1, select "UK Local" from the first dropdown
2, select "Accountants" from the dynamically created dropdown, a dropdown containing "England, Scotland, Wales, N.Ireland" will appear dynamically
3, select "UK Online" from the first dropdown
Now after step 3 you will notice that the dynamically created downdown containing "England, Scotland, Wales, N.Ireland" is still present when it should ideally disappear from the page (it was generated by clicking "UK Local" and is not a sub category list of "UK Online")
Hopefully someone can understand the above, if i didnt make something entirely clear please ask questions and i will try to explain further.
will appreciate any replies.
thnx
rg
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,476
Reputation:
Rep Power: 11
Solved Threads: 298
You will need to supply code in order for us to spot the bug. So if the code is not too long paste it inside the post surounded with code tags (press the hash sign "#" in post toolbar - you have to be in advanced posting mode). In case code is too long use attachment option bellow post area.
Also if I'm right you did it PHP so this post should be moved to PHP section of this forum. If is so, simply click on "Flag Bad Post" and request your post to be move to right section
Also if I'm right you did it PHP so this post should be moved to PHP section of this forum. If is so, simply click on "Flag Bad Post" and request your post to be move to right section
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp cross-browser javascript menu with few lines of code developer development firefox home html inbox internet javascript javascript smooth scrolling scroll smoothly window document position javascript tab menu with rounded corners generator microsoft msdn office prevent javascript menu from getting hidden under flash movies site software space sql storage unlimited vista web yahoo
- Previous Thread: Checking array
- Next Thread: LogicWeb



Linear Mode