473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Unlimited DropDown menus

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
Feb 1 '08 #1
1 2137
iam_clint
1,208 Expert 1GB
you need a recursive loop I think?

loop through all div ids
- then a sub loops to remove each of that div's child elements
- then remove the div.
Feb 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gary Smart | last post by:
Hello. I've been searching news groups and apache and google, but can't solve this one: I have an XML file used to create menu items in a Swing UI. I have a <menu> element that can have an...
19
by: chart43 | last post by:
I have question about the technique for css dropdown menus described in http://www.alistapart.com/articles/horizdropdowns/. Based on an html list, it has a few items in a 1st order list and further...
18
by: sandy | last post by:
This sounds like a frequently asked question, but I didn't find the answer in any faq I've looked at. I have a question about the wisdom of using (javascript generated) dropdown menus. ...
4
by: Ian Davies | last post by:
Hello I have two drop down menus in my php script. The items displayed in the second is dependent on which item is choosen from the first i.e. the choosen item from the first filters the items in...
3
by: ACaunter | last post by:
Hi there, can someone please tell me what the easiest way to have a dropdown menu bar positioned on the screen (eg. Home, company, ... , contact us) then when the mouse goes over then, the sub...
6
by: nishac | last post by:
Can anyone suggest me how to make my drop down menu work in IE7 too.Its working in other browsers.On mouse over the submenus should be displayed.Am attaching my css code hereby.Anyone please check...
4
torquehero
by: torquehero | last post by:
Hi all :) I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
0
by: Sky | last post by:
I have an Access 2003 front-end database with custom toolbars. The toolbars work fine. One annoying feature is that at the far right edge of each custom toolbar there a small dropdown arrow....
1
by: pedalpete | last post by:
Hey Gang, More difficult to describe this than see it, so here's a link which shows the issue I'm having http://zifimusic.com/testing/broken-hovers.html I've been looking at this for quite a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.