Nested Accordion

I would like to use the accordion to nest multiple levels of
links, while using semantic HTML. This means not surrendering to
DIV soup, but using multiple UL/LI combinations. The HTML I have
worked out, but JavaScript isn't my strong point. How would I edit
the JavaScript to make this work? HTML code sample below:
<div id="mainNav" class="Accordion">
<ul class="AccordionPanel">
<li class="AccordionPanelTab">My Flagship</li>
<li class="AccordionPanelContent">
<ul>
<li class="sectionLinksLevel2">My Home</li>
<li>
<ul>
<li class="sectionLinksLevel3">My Loans</li>
<li class="sectionLinksLevel3">My Tasks</li>
<li class="sectionLinksLevel3">My Pool
Tasks</li>
<li class="sectionLinksLevel3">My Team
Tasks</li>
<li class="sectionLinksLevel3">My Alerts</li>
</ul>
</li>
<li class="sectionLinksLevel2">Flagship
Settings</li>
<li class="hideMe">
<ul>
<li class="sectionLinksLevel3">Change
Password</li>
<li class="sectionLinksLevel3">User Profile</li>
</ul>
</li>
<li class="sectionLinksLevel2">Underwriting
ModelTraining / Resource</li>
</ul>
</li>
</ul>
</div>

You basically just insert an entire Accordion structure
inside one of the Accordion content panels of the outer accordion
and make sure that you call the constructor for the inner one:
<div id="outerAccordion" class="Accordion">
<ul class="AccordionPanel">
<li class="AccordionPanelTab">Outer Accordion Panel
1</li>
<li class="AccordionPanelContent">
<p>Here's a nested Accordion!</p>
<div id="innerAccordion" class="Accordion">
<ul class="AccordionPanel">
<li class="AccordionPanelTab">Inner Accordion Panel
1</li>
<li class="AccordionPanelContent">Inner Panel 2
Content</li>
</ul>
<ul class="AccordionPanel">
<li class="AccordionPanelTab">Inner Accordion Panel
2</li>
<li class="AccordionPanelContent">Inner Panel 2
Content</li>
</ul>
</div>
</li>
</ul>
</div>
<script>
var outer = new Spry.Widget.Accordion("outerAccordion");
var inner = new Spry.Widget.Accordion("innerAccordion");
</script>
--== Kin ==--

Similar Messages

  • Nested Accordion Panels

    I want to set up a set of nested Accordion panels but I don't know how. For instance I want to make a 3 tier Navigation structure that accordions. So I would have for example: Object 1>Sub 1> Sub Sub1, Object 1>Sub 1> Sub Sub2, Object 1>Sub 2, Object 2>Sub 1> Sub Sub1, Object 2>Sub 1> Sub Sub2, Object 2>Sub 2>Sub Sub 1, Object 2>Sub 2>Sub Sub 2. However, you seem to only be able to have a sliding panel with content under it and not be able to nest it with a panel inside a panel.
    I would use the Spry Menu Bar because it has multiple tiers however I really like the sliding feature. I know I have seen this type of menue before but I cannot remember where. Any help would be greatly appreciated.
    Also, can you have a diferent number of sub elements? You seem to only be able to pick one size all of your sub content. However, my content is not uniform in length.
    Thanks

    <!DOCTYPE HTML>
    <html>
    <head>
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">
            <div id="Accordion2" class="Accordion" tabindex="0">
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 1</div>
                <div class="AccordionPanelContent">Content 1</div>
              </div>
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 2</div>
                <div class="AccordionPanelContent">Content 2</div>
              </div>
            </div>
        </div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script src="SpryAssets/SpryAccordion.js"></script>
    <script>
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false });
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", { useFixedPanelHeights: false });
    </script>
    </body>
    </html>
    Gramps

  • Nested accordion spry

    Can someone please give me some direction as to how to do a nested accordion spry with different tabbed panel widths?  Thanks

    Never seen that done with an accordion. Why would you want different widths? Not sure what you mean by "nested" as well. I've placed accordions inside sidebars, inside Spry tabbed panels, and even in another accordion. You simply have to make a few CSS changes so it doesn't conflict with other Spry elements (change IDs).

  • Nested Accordion Spry problem

    What I am trying to accomplish is fairly simple, but I'm not seeing what the problem is.  I have a nested accordion spry that, for all intents and purposes, is working fairly well.  There's a weird problem with some of them not collapsing, but I can live with that.  What I'm trying to do is put a checkmark beside any pages in the index that the student has viewed.
    I'm setting up an array called yesPages here:
    var yesPages = Spry.$$("yesPages");
    What I want to happen is that it will hold an array of all the pages in my XML file that the student has already viewed.  A bookmark, basically.  To start it out, I place the first page in the array like so:
    yesPages="10000";
    That way, when the student starts the lesson, they've already seen the first page.  As they progress through the course, I have a function called clickNext that will add to the yesPages array in this for loop:
    for (var w=0;w<lessonStatus.length;w++)
      if (lessonStatus[w]=="Yes")
       yesPages=yesPages + "," + rowsPage[w]["@pageNo"];
       alert(yesPages);
    I put the alert in there to ensure that the yesPages array is building properly--it does.  When the student clicks on next, I get an alert that says "1000,1001" and so on and so forth, each time adding whatever page they're on to the end of the array.  Oh, and it also will sort them appropriately, too.  That way, if the student jumps around in the index, the array is still sorted numerically like so:  "1000, 1001, 2020, 3001, 3002, 4000."
    Here's my accordion code:
       <div spry:region="courseData topicList pageLister topicData">
       <div id="Accordion1" class="Accordion" tabindex="0">
         <div spry:repeat="courseData" class="AccordionPanel">       
            <div class="AccordionPanelTab">{lessonTitle}</div>
            <div class="AccordionPanelContent">
                 <div spry:repeat="topicList">
        <div id="{lessonTitle}" class="Accordion" tabindex="0">
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">   {topicList::topicTitle}</div>
             <div class="AccordionPanelContent">
                          <div spry:repeat="pageLister">
                                 <div spry:choose="spry:choose">
                                      <div spry:when="'yesPages.search({@pageNo})' != '-1'">√ {pageLister::pageTitler}</div>
                                       <div spry:when="'yesPages.search({@pageNo})' == '-1'">  {pageLister::pageTitler}</div>
                                 </div>
                          </div>
              </div>
            </div>
        </div>
                          <script type="text/javascript">
                                var Accordion2 = new Spry.Widget.Accordion("{lessonTitle}",{ useFixedPanelHeights: false });
                          </script>
                 </div>
            </div>
         </div>
       </div>
                <script type="text/javascript">
                      var Accordion1 = new Spry.Widget.Accordion("Accordion1",{ useFixedPanelHeights: false });
                </script>
      </div>
    Not sure if I copied all the </div>s to here or not, but they're all there in my code.  Anyway, courseData, topicList, pageData, and topicData are all datasets.  topicList and pageLister are nested datasets within courseData and topicData respectively.  {@pageNo} is the page number in my XML.  What I'm trying to do with the .search of the pageNo is to ensure that that page number exists within the yesPages array.  If it does, put the checkmark beside it.  Otherwise, leave it unchecked.
    What I'm getting instead is a full list of all the pages, and they are all checkmarked.  If I put a quick alert in there of yesPages, I get only the pages that they've seen.  So, this doesn't make sense as to why it's not behaving correctly.
    Anyone have an idea?

    Well, we're on the right track.  By changing Accordion2 to {lessonTitle}, it now allows me to accordion the first topic of each lesson.  However, the subsequent topics of each lesson still won't accordion.  This is so weird.  You would think that if one would do it, all of them would.

  • IE page refresh when using an accordion menu

    Hi, I have a page which has a jquery CSS styled nested accordion plug in. It's all working just so sweet, opening up menus and submenus which link to relevant pages. When the user navigates onto another page, and then goes back to the page with the accordian on it, it's should all remain open in the same state as it was when they left so they know where they were. That's what it does in Firefox. But in IE, when the user clicks the back button, the page seems to refresh and the accordian is all closed up again. Is there any way to make IE behave as Firefox does? Can I code a ''go back" link which returns them to the page exactly as it was when they left it?

    Here it is >>> http://www.comraderysportstours.com.au/indextest.html

  • Accordion Default Panel

    Is there a way to set all Spry Accordion panels closed? I
    have set the js variable defaultPanel to null and no panels open
    but I loose animation. My goal is to nest accordion panels and have
    only the selected panel open when I click on it. Is this
    possible?

    Is there a way to set all Spry Accordion panels closed? I
    have set the js variable defaultPanel to null and no panels open
    but I loose animation. My goal is to nest accordion panels and have
    only the selected panel open when I click on it. Is this
    possible?

  • Is a sorted accordion possible?

    Hey everyone,
    I've been working with XML for the past few weeks and trying to use it with Spry. So far so good, but I want to achieve something I haven't quite seen an example of: A sorted accordion/collapsible info. Below is a mockup of what I want to achieve:
    Basically it's a XML list of information that can be sorted, but it has the added functionality of a nested accordion that has additional information.
    I think I could achieve this through putting a accordion panel within a sorted list, but I'm not sure if the XML bindings will like that (the XML will change often depending on how many projects there are, so I need the list to be flexible). Not to mention that I have no idea how a spry:repeat would work with additional information breaking it up.
    Any ideas or links on how I can tackle this? I know HTML well, but I'm sort of new when it comes to the different ways of sorting XML.
    Thanks!
    K.C.

    Hi,
    The filters All, Jan, Feb etc don't sort they filter hence why some events disappear. But the construction I've done will also work if you want to have dynamic user driven sorting (mine pre sorts when the Spry dataset loads.
    General comment. The collapsible panel widget is triggered (via an observer) each time the spry data region updates. Therefore as a sort would update the region and would trigger the collapsible panel to rebuild itself with the current sort sequence. So what I have below will work with what you want. Just replace collapsible panel with accordion widget as required.
    Anyway here is the key code for the first panel tab for http://www.thehmc.co.uk/events.html  to help you get started on your version
    HTML structure
    <p>Show events from <a href="#" id="show">last year</a> or <a href="#" id="hide">this year</a> and / or for a particular month <a href="#" id="all">All</a> <a href="#" id="jan">Jan</a><a href="#" id="feb"> Feb</a> <a href="#" id="mar">Mar</a> <a href="#" id="apr">Apr</a> <a href="#" id="may">May</a> <a href="#" id="jun">Jun</a> <a href="#" id="jul">Jul</a> <a href="#" id="aug">Aug</a> <a href="#" id="sep">Sep</a> <a href="#" id="oct">Oct</a> <a href="#" id="nov">Nov</a> <a href="#" id="dec">Dec</a></p>
                <p><a href="#" id="dshow">Show</a> or <a href="#" id="dhide">hide</a> details for all events</p>
                <div id="CollapseGroup" spry:region="Events" class="SpryHiddenRegion CollapsiblePanelGroup">
                  <div class="CollapsiblePanel" id="cp{ds_RowNumber}" spry:repeat="Events">
                    <div class="CollapsiblePanelTab">{Title} <span class="Dates">({function::myDates})</span></div>
                    <div class="CollapsiblePanelContent">
                    <br/>
                      <p>{function::myDescription}</p>
                      {function::myDetails} </div>
                  </div>
                </div>
              </div>
    Javascript
    // Define Spry datasets and month filter
    var Events = new Spry.Data.XMLDataSet("EventXML5.asp", "Events/Event", {sortOnLoad: "StartDate", sortOrderOnLoad: "ascending"});
    Events.setColumnType("StartDate", "date");
    Events.setColumnType("EndDate", "date");
    // Filters
    function FiltbyMonth(month)
    var FilterbyMonth = function(dataSet, row, rowNumber){
    // Filter for events by month
    if (row.Frequency != '')
    return row;
    if (row.StartDate.indexOf(month) != -1)
    return row;
    if (row.EndDate.indexOf(month) != -1)
    return row;
    return null;
    Events.filter(FilterbyMonth);
    // Attached click event listners for all, jan, feb, mar filters etc.
    Spry.$$("#all").addEventListener('click', function(e){ Events.filter(null) }, false);
    Spry.$$("#jan").addEventListener('click', function(e){ FiltbyMonth('Jan') }, false);
    Spry.$$("#feb").addEventListener('click', function(e){ FiltbyMonth('Feb') }, false);
    Spry.$$("#mar").addEventListener('click', function(e){ FiltbyMonth('Mar') }, false);
    Spry.$$("#apr").addEventListener('click', function(e){ FiltbyMonth('Apr') }, false);
    Spry.$$("#may").addEventListener('click', function(e){ FiltbyMonth('May') }, false);
    Spry.$$("#jun").addEventListener('click', function(e){ FiltbyMonth('Jun') }, false);
    Spry.$$("#jul").addEventListener('click', function(e){ FiltbyMonth('Jul') }, false);
    Spry.$$("#aug").addEventListener('click', function(e){ FiltbyMonth('Aug') }, false);
    Spry.$$("#sep").addEventListener('click', function(e){ FiltbyMonth('Sep') }, false);
    Spry.$$("#oct").addEventListener('click', function(e){ FiltbyMonth('Oct') }, false);
    Spry.$$("#nov").addEventListener('click', function(e){ FiltbyMonth('Nov') }, false);
    Spry.$$("#dec").addEventListener('click', function(e){ FiltbyMonth('Dec') }, false);
    // Show this years or last years events
    Spry.$$("#show").addEventListener('click', function(e){ EventsList('show') }, false);
    Spry.$$("#hide").addEventListener('click', function(e){ EventsList('hide') }, false);
    // Activate collapsible panel once built (Spry data region is complete)
    var myObserver1 = { onPostUpdate: function(notifier, data) {CollapsibleGroup();} };
    Spry.Data.Region.addObserver("CollapseGroup", myObserver1);
    function CollapsibleGroup()
        var CollapseGroup = new Spry.Widget.CollapsiblePanelGroup("CollapseGroup", { contentIsOpen: false });
        CollapseGroup.openPanel(2);
        // Show and hide all events details - click handlers
        Spry.$$("#dshow").addEventListener('click', function(e){CollapseGroup.openAllPanels()}, false);
        Spry.$$("#dhide").addEventListener('click', function(e){CollapseGroup.closeAllPanels()}, false);   
    Post here if any questions.
    Regards
    Phil

  • Any Spry Experts in the House?

    Hi,
    Does anyone on here know Sprys very well? I have created an
    accordion which can be seen at this URL...
    http://kitwilkins.com/NABE_website/ourPrograms.html
    I put an accordion inside of another accordion's first panel.
    When the "Scholarships" panel is clicked, the nested accordion
    appears just fine. But when I click on the tabs of the nested
    accordion, they do not fully expand to show all of the panel
    content. Does anyone know how to fix this?
    Thanks
    Kit

    You may want to post this over in the official Spry Forums:
    http://www.adobe.com/go/labs_spry_pr1_forum
    I have a feeling that what you are asking to do would require
    modifications to the javascript code because you are asking one
    accordion to change its open behavior based on the actions of
    another accordion.
    Adobe does check that forum over there in case of bugs. And
    they will also help if it is within the scope of the program up to
    a certain extent. If it was something that was not originally
    intended and would require custom scripting they might not be able
    to help.
    Also you could head over to Project Seven's website:
    http://www.projectseven.com/
    They have an Accordion extension for DW which usually goes
    above and beyond what Adobe gives you. You could post in their
    newsgroup (they do not have a forum) and see if their accordion
    extension will do what you need it to before you consider
    purchasing their extensions.

  • Nesting fly out menus in an accordion

    Is it possible to install a vertical fly out menu nested
    within a 150px wide accordion. I'm creating a navigation system
    that will allow customers to browse products by either make of
    vehicle, product manufacture, and product category. I thought I
    would use the accordion for the 3 browse methods and then menu
    inside it. I've set the accordion to expand vertically to
    accommodate the varying menu lengths. However, the sub-menus are
    not flying out. The Accordian is nested in a 170px div. Any
    suggestions for making this work? Or other suggestions for an
    elegant solution for long menus with lots of sub_menus. The menus
    will be populated dynamically as products are removed and added in
    the database.
    Thanks in advance.

    You could do this easier if you used dependent dropdowns for
    the vehicle, product manufacture, and product category with a
    search option, this would eliminate a lot of work and confusion.
    This might help, I have been trying to find a good extension
    for menu's that I could either have static or turn dynamic, I just
    purchased Pop Menu Magic from Project Seven
    http://www.projectseven.com/products/menusystems/pmm/index.htm
    I can insert these menu's in the Accordion and do not have
    the problem that you are having with the flyouts, if you are using
    2 or more use server side include.
    What impressed me the most was when I submitted a inquiry
    about the product I received a response by phone from Al Sparber,
    who walked me though the extension and then when I had a question
    after purchase he was right there to help, not going to get that
    kind of service from very may companies.
    One last thing, remember that the search engines are not able
    to index AJAX or SPRY so this might be a concideration when
    designing this and look at menu systems that are search engine
    friendly.

  • Spry accordion with nested accordions

    I'm building an FAQ list with topics and sub topics, using a
    containing Spry accordion with multiple children, though just the
    one extra level deep. The nested accordions won't expand the full
    list. Instead, the div height remains fixed, and I get a scroll
    bar. Any ideas what part of the javascript to tweak to open up this
    functionality?
    Here's the page:
    http://www.pixmission.net/dev/tex/faqs.htm
    thanks

    alancymru escribió:
    > I'm building an FAQ list with topics and sub topics,
    using a containing Spry
    > accordion with multiple children, though just the one
    extra level deep. The
    > nested accordions won't expand the full list. Instead,
    the div height remains
    > fixed, and I get a scroll bar. Any ideas what part of
    the javascript to tweak
    > to open up this functionality?
    >
    > Here's the page:
    >
    http://www.pixmission.net/dev/tex/faqs.htm
    >
    > thanks
    >
    Sure! It has to be done in two parts. First part from your
    SpryAccordion.css file and the second it is adding a new
    property to the
    Accordion object when it’s initialized.
    First part:
    Select .AccordionPanelContent class
    Delete Height property
    Change the value of overflow from auto to hidden;
    Second part:
    In the constructor function at the bottom of your faqs.htm
    file, amend
    this code:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    var Accordion9 = new Spry.Widget.Accordion("Accordion9");
    to this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1",
    {useFixedPanelHeights:false});
    var Accordion9 = new Spry.Widget.Accordion("Accordion9",
    {useFixedPanelHeights:false});
    Hope this helps.

  • Nested Spry accordion

    Hi,
    I am trying to nest a spry accordion in spry tabbed panels. You can see a simlified version at:
    http://www.artinso.com/astronomy/sprytest.html
    It works well enough in Firefox, Safari etc.
    However in IE I get "object expected" scripting errors and neither tabbed panels nor accordion seem to work.
    What am I missing here? Can you not nest accordions in tabbed panels?
    Regards
    Berthold Hamburger

    Hi,
    Thanks that solved it. Apparently my spry files must be corrupt. Do you know where I can re-download them?
    Now the next problem surfaced with accordion widget. If you go on page:
    http://www.artinso.com/astronomy/mirror-o-matic.html
    and press the Videos tab further down that page, all the accordion panels are open on IE, while they work fine on FF. Is that also file corruption problem?
    Thanks
    Berthold
    Berthold Hamburger - Cellist/Spain
    Email: [email protected]
    http://www.artinso.com
    http://www.astro.artinso.com
    Este mensaje, y los documentos en su caso anexos, se dirigen exclusivamente a su destinatario y pueden contener información reservada y/o CONFIDENCIAL cuyo uso no autorizado o divulgación está prohibido por la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía o por teléfono (+34-981613415) y proceda a su destrucción.
    This message and its attachments are intended exclusively for the addressee and may contain information that is privileged and/or CONFIDENTIAL.  Its non authorized use or disclosure is prohibited by law.  If you are not the intended recipient, please notify us immediately by the same channel as its receipt or by telephone (+34-981613415) and kindly destroy it.

  • Dashed rule between menu items nested inside an accordion panel widget in Muse?

    I have a vertical menu widget nested inside an accordion panel widget and I want a dashed rule under each menu item. I already know I can have a solid rule by assigning a stroke to just the bottom of each menu item container. 
    I manually created dashed rules by "step and repeating" a 1px black square followed by 2px of space to a 380px width. I positioned these dashed rules under each menu item and grouped them with the menu. Then I placed the menu widget with the dashed rules into the content container for the accordion panel.  The menu expands and collapses in the Preview mode but the dashed rules don't show up.
    Muse CC 2014, iMac OS10.9

    The link again is I forgot to add http to the link before, but it should have worked.
    http://www.lipowiec.org/test/index.php
    a) used Dreamweaver to create new site selected 1 column, elastic, centered, header, and footer
    b) used spry to add horizontal menu to header
    c) followed instructions from Spry Help
    http://livedocs.adobe.com/en_US/Spry/SDG/index.html?lang=en_US ->
    working with spry widgets -> working with the menu bar widget -> Customize the dimension of menu items as indicated
    To change the dimension of menu items by changing the width properties of the menu item’s li and ul tags.
    Locate the ul.MenuBarVertical li or ul.MenuBarHorizontal li rule.
    Change the width property to a desired width, or change the property to auto to remove a fixed width, and add the property and value white-space: nowrap; to the rule.
    Locate the ul.MenuBarVertical ul or ul.MenuBarHorizontal ul rule.
    Change the width property to a desired width (or change the property to auto to remove a fixed width).
    Locate the ul.MenuBarVertical ul li or ul.MenuBarHorizontal ul li rule.
    Add the following properties to the rule: float: none; and background-color: transparent;.
    Delete the width: 8.2em; property and value.
    Under IE it's broken, under the other browsers it works.
    There need to be more IE HACKS added.

  • Lightbox nested in Accordion panel is not working.

    I am attempting to nest a lightbox slideshow in an accordion panel with less than desired results. I can get the Lightbox to nest and I can arrange the buttons just fine .However, when I preview it my forward and back buttons appear in the upper left corner and they are all messed up. This is absolutly useless as it destroys the aesthetics. Any insights as to how to fix this (not work around, I can do that...) would be appreciated.
    Here are some screens:
    1) layout is fine. Note the advance arrows on left and right of layout.
    2) Layout seems to be fine in the preview. Thumbnails look good...
    3) The advance arrows are not where I placed them in the layout. They are overlapping in the upper left corner.

    Well, it's not recreating what I did becauseI don't see any images in your example. Did you populate the gallery?
    Anyhow:
    I created an accordion panel.
    The first top panel contains a price list with text only.
    Using the "+" I made a second panel and placed a "slideshow lightbox" widget
    I populated the widget with roughly 100 jpegs compressed to 50%  and edited my arrow keys placing them on the left and right which
    gave the results in the image above.
    This is repeatable on my end.

  • Nested Sliding Panel in an Accordion Panel

    I have a nested Sliding Panel inside an Accordion Panel.
    The Sliding panel will show until the Accordion panel is
    completely closed then it abruptly hides itself.
    It does this only in IE of course.
    Not sure if a sliding panel can be properly nested inside an
    Accordion panel so if anybody could please tell me I would really
    appreciate it.
    Thank you,
    Bisser.

    Hi kinblas,
    I changed the AccordionPanelContent5 to "hidden" and it still
    keeps the image displayed until the Accordion Panel closes, and
    then the nested sliding panel image disappears abruptly. This only
    happens in IE.
    Any other suggestions would be welcome.
    Thank you,
    Bisser.

  • Accordion as nested menu

    I have the following setup:
    &lt;div id=&quot;regionMainMenu&quot;
    spry:region=&quot;dsMenu&quot;&gt;
    &lt;div id=&quot;Accordion1&quot;
    class=&quot;Accordion&quot;
    tabindex=&quot;0&quot;&gt;
    &lt;div id=&quot;regionMenuItems&quot;
    spry:repeat=&quot;dsMenu&quot;
    class=&quot;AccordionPanel&quot;&gt;
    &lt;div
    class=&quot;AccordionPanelTab&quot;&gt;{Text}&lt;/div&gt;
    &lt;div id=&quot;menuItem&quot;
    class=&quot;AccordionPanelContent&quot;&gt;
    &lt;div
    id=&quot;regionSubMenu&quot;&gt;{Text}&lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;script
    type=&quot;text/javascript&quot;&gt;
    &lt;!--
    var ac1 = new
    Spry.Widget.Accordion(&quot;Accordion1&quot;,{useFixedPanelHeights:false,
    defaultPanel:0});
    //--&gt;
    &lt;/script&gt;
    &lt;/div&gt;
    Because spry-region does not support nested regions. I loaded
    the complete menu.xml in another dataset. and use onDataChange
    observer to populate the AccordionContent with the current MenuID..
    See below:
    var dsMenuData = new
    Spry.Data.XMLDataSet(&quot;data/menu.xml&quot;,
    &quot;Menus/Menu&quot;);
    dsMenuData.addObserver({onDataChanged:function(ds,
    data){return dsMenuData_DataChanged(ds, data, 1)}});
    var dsMenuData_DataChanged = function(dataSet, data,
    datasetnumber)
    Spry.$$(&quot;#regionSubMenu&quot;).forEach(function(div) {
    ListSubmenus(div); });
    function ListSubmenus(menu)
    //GetSubMenus
    if(menu &amp;&amp; dsMenuData)
    //dsMenuData.loadData();
    var rows =
    dsMenuData.getData();//.findRowsWithColumnValues({ParentID:
    &quot;'&quot; + menu.innerHTML + &quot;'&quot;});
    if(rows.length&gt;0)
    var subItems = &quot;==&quot;;
    var c = menu.innerHTML;
    for (var i = 0; i &lt; rows.length; i++)
    { var p = rows
    [&quot;ParentID&quot;];
    if(p &amp;&amp; c &amp;&amp; p == c)
    subItems += &quot;&amp;nbsp;• &quot; +
    rows[&quot;Text&quot;] +
    &quot;&amp;nbsp;&quot; + c + &quot;:[&quot; + p
    + &quot;]&lt;br&gt;&quot;;
    menu.innerHTML = subItems;
    else
    menu.innerHTML = &quot;none&quot;;
    else
    menu.innerHTML = &quot;---&quot;;
    The issue I am having is in the bold line &quot;var c =
    menu.innerHTML;&quot; I can assign a number like 1 or 2 to c..
    and it finds the menus. I can even compare
    &quot;parentID&quot; with a string and it finds them. But
    whenever I leave it has is and pass the menu.innerHTML it doesn't
    work. Is there something programatically incorrect with doing this?
    I even print out menu.innerHTML on the same line and it returns the
    value I need. I strip spaces convert to string number, doesn't
    matter. What am I doing wrong?
    Any one please help thanks.

    1. Yes. What third table would you need?
    2. No & No.
    You shouldn't be able to delete a category if it has products as children.
    You should have tables..
    Category
    CategoryID (INT) - Primary Key, Auto number
    CategoryName
    etc
    Products
    ProductID (INT) - Primary Key, Auto number
    ProductName
    CategoryID (INT) - Foreign Key to Category
    etc
    If you change something in Category, NOTHING changes in Products.

Maybe you are looking for