Dynamically fill a menu navigation menu drop-down

I have some beautiful CSS to develop a horizontal drop down menu navigation similar to what is used on this site. But I can't understand how dynamically populate the menu and submenu items.

The parents and children are stored in a single table with this structure:

TopNavId
TopNavParentId (for all parents, is 0 for all children, it is TopNavId for the parent)
TopNavName
TopNavOrder
TopNavURL
TopNavStatus

I should be able to write a query to get the information in the table and then somehow loop on this query to get the pieces (parents and children) in the menu structure, just? I can't understand how to do this.

Help? Thank you!

-------------


Thank you, Michael. The scooter5791 of recommended Sothink products is actually quite easy. Request of the mother works as a

SELECT *.
TRACKING
WHERE topNavParentId = 0
AND TopNavStatus = 1
ORDER BY topNavOrder

Request of the child is simply

SELECT *.
TRACKING
WHERE topNavParentId <> 0
AND topNavStatus = 1
AND #getTopNav.topNavId #= topNavParentId

and then just exit it traverses the query GetTopNavDropdown, essentially:


' #topNavName # ' #topNavURL #.

The Sothink product made all the formatting, etc.

Thank you, everyone, for help. -Dbast

Tags: ColdFusion

Similar Questions

  • Create a drop down that fills the list based on the shape of the selection a menu drop-down.

    I need to set up a drop down menu which is popualated (i.e. displays a certain list of selctions in the drop-down list) based on the choice of the form user selects an adjacent list

    For example

    There are two drop-down list field sitting side by side in form

    1. Select State 2. Select the course

    I want to do is have a list of States in the first drop (State 1.Select) and depending on the State in which the form user selects, the second menu drop-down (2. Select courses) is filled with a selction of courses available in this selected only State (i.e. will it be on; show course available in QLD if QLD is selected).

    Is it difficult to do?

    Hello

    You can also use events preOpen from the drop-down list, to recall the previous selections in other objects and populate the drop-down list accordingly: http://assure.ly/jcTahK

    Good luck

    Niall

  • addresses of Firefox in the navigation bar are missing/replaced by different menu drop down

    When I type in an address, the drop down menu no longer contains the same list of addresses as always. Instead, there is a list of locations (less actual addresses www.com beneath each) in bold and some places are repeated in the menu drop down but take me to a different site. Its a game guessing where Im going when I click on one. Next to each entry, there is a magnifying glass icon which was not there before. I was search playback for almost 3 hours trying to trouble shoot the issue and Ive tried to restore default with no luck. It's really annoying me... Any suggestions?

    It can happen because your some bars of tools and malware too...

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • Show alert window when the selection is made in menu drop-down (or when the text field is filled)

    I'm a JavaScript novice writer and need help a warning window that meets the programming user selection form a menu drop-down.

    If the user selects any option except the default choice (which is just an empty space), I want an alert is displayed.  If the user is moving through this area without changing the default value, nothing should happen.

    I have a script attached to the "blur" event for the dropdown menu, but it appears each time you tab in this area, of course.  I don't know how to tell him to display the alert if and only if the user has changed the selection.

    Similarly, I have another field which is a simple text field.  If the user types anything in this area, I would like another alert window pops up.  The thing from the drop-down list seems a little more difficult, so if anyone can help me get that squared away, I can probably understand how to program the alert text field.

    In fact, it's the same code for both types of fields:

    If (event.target.value! = event.target.defaultValue) app.alert ("your message");

  • Change of image in the selection of the menu drop-down

    I am very new to LiveCycle ES 8, trying to get what I think can be called a dynamic image. When you select a value in the menu drop down, the image changes on the other page, to adapt to the value selected in the previous page. I'm not a programmer, I'm ready to do what I can to make this work. Any help would be greatly appreciated. Thank you.

    Hello

    It is possible to achieve what you want. You will need a few items:

    • drop-down list object script;
    • objects 'image', one for each image you want. It would be set to hidden.
    • object 'imageField. You should only one of them. The initial value is null. The script in the menu dropdown will fill the imageField with the object of the appropriate image.

    When you configure the drop-down list, it may be convenient to specify values in the binding tab (for example, 1, 2, 3,...). Then, in the script, you can view the numbers rather than the strings that the user sees in the drop-down list.

    The imageField1 must be set to access read only in the initialize event:

    This.Access = "readOnly";

    This will prevent the user of the substitution of the image.

    When you configure the image1, image2, image3 objects make sure you check the "embed image data', users can not have images available to them.

    You can put similar Javascript in the event of release from the drop-down list:

    If (this.rawValue == 1) {}

    imageField1.rawValue = image1.value.image.value;

    } ElseIf (this.rawValue == 2) {}

    imageField1.rawValue = image2.value.image.value;

    } ElseIf (this.rawValue == 3) {}

    imageField1.rawValue = image3.value.image.value;

    }

    Good luck

    Niall

    PS because the drop-down list object and image objects are on different pages, you will need full references. If the drop-down list is located on page 1 and the pictures on page 2, the reference should look like:

    Page2.imageField1.RawValue = page2.image1.value.image.value;

  • Menu drop-down list does not apear, instead of this, there is a miniature version of the Thunderbird window. How to fix?

    On a new installation of Thunderbird running on a new instalation of Windows 7 in the dropdown menu will not work. By clicking on the list of the menu drop-down appears, but instead to be filled with tryies to squeez options in a copy of the window full thunderbid - see the screenshot.

    Restart in SafeMode it works OK.

    Any ideas how to fix?

    No picture, but try this
    https://support.Mozilla.org/en-us/questions/1012145

    Not better?

  • Problems of menu drop-down

    No idea why my drop-down menus do not work?  Also, brought back to the cell phone, the three drop-down bar no longer work.

    Web page: Marco AVID

    <! doctype html >

    < html >

    < head >

    < meta charset = "utf-8" >

    < meta http-equiv = "X-UA-Compatible" content = "IE = edge" >

    < meta name = "viewport" content = "width = device-width, original scale = 1" >

    AVID Marco < title > < /title >

    < link href = "Index css/multiColumnTemplate.css" rel = "stylesheet" type = "text/css" >

    < link href = "Index css/bootstrap.css" rel = "stylesheet" type = "text/css" >

    < style type = "text/css" >

    a: link {}

    Color: #000000;

    text-decoration: none;

    }

    a: visited {}

    text-decoration: none;

    color: rgba (0,0,0,1);

    }

    a: hover {}

    text-decoration: none;

    Color: #000000;

    }

    a: active {}

    color: #FCFCFC;

    text-align: center;

    }

    < / style >

    <! - HTML5 shim and Respond.js for IE8 take in charge of the HTML5 elements and questions from the media - >

    <!-WARNING: Respond.js does not work if you view the page via file://-->

    <!-[if lt IE 9] >

    " < script src =" https://OSS.MaxCDN.com/html5shiv/3.7.2/html5shiv.min.js "> < / script > .

    " < script src =" https://OSS.MaxCDN.com/respond/1.4.2/respond.min.js "> < / script > .

    <! [endif]-->

    < / head >

    < body bgcolor = "#FFFFFF" style = "padding-top: 70px" >

    < div class = "container" >

    < header >

    < div class = "primary_header" >

    < nav class = "navbar, navbar-default navbar-fixed-top" >

    < div class = "container-fluid" >

    <!-brand and toggle get grouped together for better mobile display->

    < div class = "bar navigation-header" >

    < button type = "button" class = "toggle navigation bar has collapsed" data-toggle = 'collapse' data-target = "#topFixedNavbar1" aria-expanded = "false" > < span class = "sr only" > toggle navigation </span > < span class = 'bar icons' > < / span > < span class = 'bar icons' > < / span > < span class = 'bar icons' > < / span > < / button >

    < / div >

    <!-collect the nav links, forms, and other content to alternate->

    < div class = "navbar-collapse collapse" id = "topFixedNavbar1" >

    < ul class = "navbar-nav nav" >

    < class li = "active" > < /li >

    < class li = "active" > < /li >

    " < li > < a href =" https://MFmS.schoolloop.com/Portal/login?d=x & 1414597056174 = return_url "title ="Schoolloop' target = '_blank' > Schoolloop < /a > < /li > "

    " < li > < a href =" https://portal.capousd.org/ParentPortal/LoginParent.aspx?page=default.aspx "title = 'Portal' target = '_blank' > Student & Parent < /a > < /li > Portal "

    < li > < a href = "Events.htm" title = "Events" target = "_blank" > events on demand < /a > < /li > "

    < class li = "dropdown" > < a href = "#" title = "Photos & amp; Video class' = 'list drop-down-turn' aria-expanded = "false" aria-haspopup = "true" role = "button" data-toggle = "dropdown" > Photos & video < span class = "circumflex accent" > < / span > < /a >

    < ul class = menu "dropdown" >

    class 2016-2019 < /a > < /li > < li > < a href = "2019_album.html - 2016" >

    < li > < a href = ' 2015 - 2018_album.html "> class of 2015-2018 < /a > < /li >

    < li > < a href = "2014 - 2017_album.html" > class of 2014-2017 < /a > < /li >

    < li > < a href = ' 2013 - 2016_album.htm "> class of 2013-2016 < /a > < /li >

    < li > < a href = "2015_album.htm - 2012" > class of 2012-2015 < /a > < /li >

    < li > < a href = ' 2011 - 2014_album.htm "> class of 2011 to 2014 < /a > < /li >

    < li > < a href = ' 2010 - 2013_album.htm "> class of 2010-2013 < /a > < /li >

    < li > < a href = ' 2009 - 2012_album.htm "> class of 2009-2012 < /a > < /li >

    < li > < a href = ' 2009 - 2011_album.htm "> class of 2009-2011 < /a > < /li >

    < li > < a href = ' 2008 - 2010_album.htm "> class of 2008-2010 < /a > < /li >

    < li > < a href = "2006 - 2008_album.htm" > promotion 2006-2008 < /a > < /li >

    < li > < a href = "2004 - 2006_album.htm" > promotion 2004-2006 < /a > < /li >

    < li > < a href = "#" > promotion 2003-2005 < /a > < /li >

    < li > < a href = "ALBUMS/2002_Yearbook.pdf" > class of 2000-2002 < /a > < /li > ""

    < li > < a href = "ALBUMS/1999_AVID.pdf" > class of 1997-1999 < /a > < /li > ""

    < /ul >

    < /li >

    < class li = "dropdown" > < a href = "#" title = "Tips for Parents" class = "menu drop-down-toggle" aria-expanded = "false" aria-haspopup = "true" role = "button" data-toggle = "dropdown" > tips for the Parents of AVID < span class = "circumflex accent" > < / span > < /a >

    < ul class = menu "dropdown" >

    < li > < a href = "AVID_Parents.htm" title = "Tips for Parents" target = "_blank" > English < /a > < /li > "

    < li > < a href = "AVID_Parents_Spanish.html" target = "_blank" > Español < /a > < /li > "

    < /ul >

    < /li >

    < /ul >

    < ul class = "navbar-nav, navbar-right nav" >

    < li > < a href = "AVID Application.pdf" title = 'Application' target = '_blank' > Application AVID < /a > < /li >

    < class li = "dropdown" > < a href = "#" title = "On Marco AVID" class = "menu drop-down-toggle" aria-expanded = "false" aria-haspopup = "true" role = "button" data-toggle = "dropdown" > on Marco AVID < span class = "circumflex accent" > < / span > < /a >

    < ul class = menu "dropdown" >

    < li > < a href = "AVID_History.htm" > story < /a > < /li > AVID ""

    < li > < a href = "Marco_AVID_History.htm" > story Marco AVID < /a > < /li > ""

    < li > < a href = "avid_statistics.htm" > AVID statistics < /a > < /li > ""

    < li > < a href = "faq.htm" > frequently asked Questions < /a > < /li >

    < role li "separator" = class = "divisor" > < /li >

    < li > < a href = "Recruitment.mp4" target = "_blank" > < /li > < /a > information video "

    < li > < a href = "Recruitment_in_Spanish.mp4" target = "_blank" > video Informativo de AVID < /a > < /li > "

    < /ul >

    < /li >

    < /ul >

    < / div >

    <!-/ .navbar-collapse->

    < / div >

    <!-/ .container-fluid->

    < / nav >

    < img src = "images/sequence - 01.gif" class = "img-reagent" alt = "" > < / div >

    < br >

    < / header >

    < center >

    < div class = "btn-group" role = 'group' aria-label = «...» ">

    " < a href =" https://MFmS.schoolloop.com/Portal/login?d=x & 1414597056174 = return_url "target ="new"> < / a > "

    " < a href =" https://portal.capousd.org/ParentPortal/LoginParent.aspx?page=default.aspx "target ="new"> "

    < /a >

    < a href = "AVID Application.pdf' target = '_blank' >

    < /a >

    < a href = "AVID_Parents.htm" target = "_blank" > "

    < div class = "btn-group" >

    < / div >

    < /a >

    < a href = "6th_grade_resources.htm" title = "6th Grade resources" target = "_blank" > "

    < button type = "button" class = "btn, btn-default" > 6th Grade resources < / button >

    < /a >

    < a href = "7th_grade_resources.htm" title = "7th Grade resources" target = "_blank" > "

    < button type = "button" class = "btn, btn-default" > 7th Grade resources < / button >

    < /a >

    < a href = "8th_grade_resources.htm" title = "8th Grade resources" target = "_blank" > "

    < button type = "button" class = "btn, btn-default" > 8th Grade resources < / button >

    < /a >

    < div class = "drop neck-lg-1" >

    < p > < a class = "dropdown-point list" href = "2019_album.html - 2016" > class of 2016-2019 < /a > < p >

    < p > < a class = "dropdown-point list" href = "2015 - 2018_album.html" > class of 2015-2018 < /a > < p >

    < p > < a href = "2014 - 2017_album.html" target = "_blank" class = "menu drop-down-item" > class of 2014-2017 < /a > < p >

    < p > < a href = ' 2013 - 2016_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2013-2016 < /a > < p >

    < p > < a href = ' 2012 - 2015_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2012-2015 < /a > < p >

    < p > < a href = ' 2011 - 2014_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2011 to 2014 < /a > < p >

    < p > < a href = ' 2010 - 2013_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2010-2013 < /a > < p >

    < p > < a href = ' 2009 - 2012_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2009-2012 < /a > < p >

    < p > < a href = ' 2009 - 2011_album.htm "target ="_blank"class ="menu drop-down-item"> class of 2009-2011 < /a > < p >

    < p > < a href = ' 2008 - 2010_album.htm ' target = '_blank' class = "menu drop-down-item" > class of 2008-2010 < /a > < p >

    < p > < a href = "2006 - 2008_album.htm" target = "_blank" class = "menu drop-down-item" > promotion 2006-2008 < /a > < p >

    < p > < a href = "2004 - 2006_album.htm" target = "_blank" class = "menu drop-down-item" > promotion 2004-2006 < /a > < p >

    "< p > < a href="ALBUMS/AVID_2003-2005/2003-2005_AVID.mp4 "target ="_blank"class ="menu drop-down-item"> 2003-2005 < /a > < p > promotion

    < p > < a href = "ALBUMS/2002_Yearbook.pdf' target = '_blank' class ="menu drop-down-item"> class of 2000-2002 < /a > < p >"

    < p > < a href = "ALBUMS/1999_AVID.pdf' target = '_blank' class ="menu drop-down-item"> class of 1997-1999 < /a > < p >"

    < / div >

    Thank you!

    Links to these files are incorrect on your download page, here's why...

    The... / to link resources ' move to a directory "so away which is located in the folder root of your site, the IndexA.html page you gave as an example, the link to the page"... / js/bootstrap.js "says the browser to" mount a directory and look for a folder called js, and then open the file called bootstrap.js.

    No Viewer online will have access to this directory because it is one higher than the root of the site (the first directory available to the public for your site). If scripts on these files cannot be run by the user's browser because they don't have access to the directory, in that they are supposed to be.

    Something went wrong, be it with your site definition, or of your download, causing these links to create properly.

    If these files are located in a folder called js in the root of your site (on the same level as IndexA.html), you can remove the... / in front of them to add a link to the page for scripts.

  • Does not not on the website of phone menu drop-down

    I am currently working on a version of phone of my new site, and for some reason any the drop down sub menus do not appear in the navigation bar. Is anyone able to suggest where I go wrong?

    Hi Contemporary_Dave,

    Go to the options menu panel and check what type of menu. (For phone use)

    If it's 'Top level Pages' and then selecting 'All pages' in the menu drop-down will begin showing the submenus as well.

    In case the menu type is "Manual" then you create the submenu for each menu item or create a menu with the type of menu in the form of 'all pages '.

    Kind regards

    Vivek

  • CSS ruin in menu drop-down

    Hey all,.

    I'm trying to sort out what's going wrong with my menu drop down and I could use an extra set of eyes. Everything works as I want, except when you mouseover "At Your Service". The link jumps to the right. Please help me to resolve this issue. Here is a link to the test page:

    http://kaufmanphotography.com/test/weddings/approach.htm

    Down below is the CSS that refers to these actions:

    CSS / * navigation main header - top right * / #headerNavdiv {width: 490px;}           do-family: Arial, Helvetica, without serif.           font size: 0.9 em;           color: # 6 0000;           text-align: right;           padding-top: 5px;           margin left: 460px; } #headerNav ul {list-style: none ;} #headerNav > li {float: left ;} #headerNav li a {display: block;}}}           height: 2em;           line-height: 2em;           text-decoration: none;           padding: 0 1.5em; } #headerNav ul {position: relative;}           display: none;           z index: 999; } #headerNav ul li a {width: 79px;}           text-align: center; } #headerNav li: hover ul {display: block ;}}

    Sorry... I can't do the above readable... just look at the page source, etc. I really appreciate the help!

    Samantha

    Change your selectors css as follows:

    #headerNav ul {}

    list-style: none;

    position: absolute;

    margin: 0;

    padding: 0;

    }

    #headerNav li {}

    position: relative;

    float: left;

    }

    #headerNav ul {}

    display: none;

    z index: 999;

    }

  • Try to change the menu drop-down

    I created a form that uses a lot of drop-down menus and trying to get the menu drop-down see the descriptions and have actually filled area with a number of coin instead of the description. I am not against XML encoding if necessary I am new to it but played around a little bit. Ideas or direction would be greatly appreciated thanks.

    Yes. To descriptions in the menu drop down and then specify values in the binding tab. In the event for the menu output drop-down put the code (in formcalc):

    If ($.rawValue == 1) then

    $.formattedValue = "109323" / / put all part number is here

    ElseIf ($.rawValue == 2) then

    $.formattedValue = "109324" / / etc

    endif

    the rawValue is the value of the option, the person has chosen in the menu and the formattedValue is what the box displays the exit event has run.

  • Multiline entries in the menu drop-down

    Hi - I have a dropdown list with a very long list, display in a fixed field area. Some of the entries are very long, and since the menu drop down allows only one line, the rest of the entry is hidden. Is it possible to get the drop down menu to view multiple lines? Or at least to commit the selection to class landlines box multiline?

    A drop-down list oly shows simple lines.

    But you can use a textfield as alias to design something similar.

    I have an example of a form with a table that uses a drop-down list field that is usually with white text.

    When you enter the drpdown, the text becomes black.

    You can select an entry that will be then filled in a textfield alias that can display multiple lines.

    After that, the text in the drop-down list returns to white.

    https://Acrobat.com/#d=kvGJ4kTvXaZHj5g6LJpP6Q

  • NavBar menu drop down behind the sidebar

    I sent this yesterday but didn't have not heard of anyone. Anyone want to take a stab at it for me please.


    Would be someonoe take a look at the navigation bar on this site I'm redesign please.

    Fall of IE7 under ministries and stewardship fall behind the top area of the sidebar. IE6 and FF looks good.

    There are still a few errors that I work, but do not believe they have something to do with the navigation bar Act in this way in IE7.

    Also in IE6 my head sometimes has very long. Thoughts?

    I hope someone can help. Thank you.

    Lynne

    Search for this rule:

    {#navbar}
    Background: url (.. / images/bg_topbar.jpg);
    background-color: #13214 c;
    height: 2.25em;
    margin: 0;
    }

    Change to this:

    {#navbar}
    Background: url (.. / images/bg_topbar.jpg);
    background-color: #13214 c;
    height: 2.25em;
    margin: 0;
    position: relative;
    z index: 999999;
    }

    --
    Al Sparber - PVII
    http://www.Projectseven.com
    The finest Menus Dreamweaver | Galleries | Widgets
    http://www.Projectseven.com/go/pop
    The ultimate DW menu system

    "lynnegeek" wrote in message
    News:gonj2e$5RP$1@forums. Macromedia.com...
    > Thanks for checking out Mark. I tried your suggestions and it does not
    > work. I have
    > currently have mistakes, but they are caused by the video and
    > marquee.
    > When I take those out, the page validates well. I replace the
    > marquee
    > as soon as I find some js to do the same.
    >
    > Unfortunately my nav menu drop-down under the stewardship and departments always
    > mask
    > behind the top in the sidebar box.
    >
    > I'm starting to have pain in the chest over this. Don't know what I don't see.
    > I
    > guess that has to do with the top box.
    >
    > Is there anyone out there (I want to sing Pink Floyd!) that
    > would be
    > Take a look at this for me. Here is the
    > http://www.webassistantsllc.com/clients/QOP
    >
    > I appreciate any help. Lynne:
    >

  • How can I order by alphabet created list on a menu drop-down?

    How can I order by alphabet created list on a menu drop-down?

    Click the cell that contains the data of cell format pop-up menu. On the cell on the right Panel tab, you will see these menu items. Drag to reorder alphabetically. There is no provision to automatically sort this list of menu items.

  • Cannot use my address bar. Press enter, nothing happens. Click on menu drop down and it will not go to the address

    Address bar does not work. Will not open search or site Web open, even when I click on addresses in the menu drop-down. I tried to start in safe mode and I tried Firefox refreshing. I even tried to reinstall Firefox. Any suggestions?

    I did a system restore, after seeing some other problems with my computer. Now, it seems to work correctly. I think that refreshing Firefox may not have worked until I did the restore, because he tried to open my previous session, even after rebooting. When I started after restoring the system, is no longer a bookmarked or saved passwords. So I'm not sure what I did than the fixed, but it seems to work now. Thanks for all the help

  • Add a Web site to menu drop-down

    How can I add a sute of web for the menu drop-down

    This drop-down list is automatically populated with sites you have already visited. I'm not aware of any way to select the items manually.

  • I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not display in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not appear in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    You must save the spreadsheet containing the new date as a model format and use this custom template for each new spreadsheet where you want that this date format personalized at your disposal.

Maybe you are looking for