Advanced Search

Results 1 to 9 of 9

Thread: ddAccordion

  1. #1
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ddAccordion

    1) Script Title:
    Bullet List Accordion Menu with Nested Levels

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-bullet.htm

    3) Describe problem: When a user clicks on a link in the navigation, the open menus should close. I have been using the collapseall function and it has been working perfectly. I then recently moved the site to a new server and it does not collapse when called. Could be a load page issue. It occurs on onClick. Pages load faster on this new server. Can send code if needed.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,864
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    Make sure persistence is disabled in the script. Also, how are you calling collapseall()? One way is to add it to the sub menu container like so:

    Code:
    <div class="arrowlistmenu">
    
    <h3 class="menuheader expandable">CSS Library</h3>
    <ul class="categoryitems" onClick="ddaccordion.collapseall('expandable')">
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/">Horizontal CSS Menus</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/">Vertical CSS Menus</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/">Image CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/">Form CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/">DIVs and containers</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/">Links & Buttons</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C8/">Other</a></li>
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/all/">Browse All</a></li>
    </ul>
    
    <h3 class="menuheader expandable">CSS Drive</h3>
    <ul class="categoryitems">
    <li><a href="http://www.cssdrive.com">CSS Gallery</a></li>
    <li><a href="http://www.cssdrive.com/index.php/menudesigns/">Menu Gallery</a></li>
    <li><a href="http://www.cssdrive.com/index.php/news/">Web Design News</a></li>
    <li><a href="http://www.cssdrive.com/index.php/examples/">CSS Examples</a></li>
    <li><a href="http://www.cssdrive.com/index.php/main/csscompressor/">CSS Compressor</a></li>
    <li><a href="http://www.dynamicdrive.com/forums/forumdisplay.php?f=6">CSS Forums</a></li>
    </ul>
    
    </div>
    In this case, clicking any of the links inside the "CSS Library" section will close that section. For efficiency, you may want to call collapseone() instead.
    DD Admin

  3. #3
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am parsing in the URL, based on the cID, the link will appear with a certain class. For instance if it is live it has an arrow next to it. When I click on a link, the menu jumps up real fast like its trying to close and then it bounces back down.

    The code is:
    Code:
    <?php
    $homepage = "http://portal.nyls.edu/sba/";
    $currentpage = $_SERVER['REQUEST_URI'];
    if (($_GET['cID'] == '37') || ($_GET['cID'] == '38') || ($_GET['cID'] == '39') || ($_GET['cID'] == '40')|| ($_GET['cID'] == '41')|| ($_GET['cID'] == '42')|| ($_GET['cID'] == '43')|| ($_GET['cID'] == '44')|| ($_GET['cID'] == '45')|| ($_GET['cID'] == '46'))
    print("<h3 class=\"menuheader\" style=\"cursor: default\")><a href=\"http://portal.nyls.edu/sba/index.php\" onClick=\"ddaccordion.collapseall('expandable'); \">Home</a></h3>");
    else
    print("<h3 class=\"menuheader\"><a href=\"http://portal.nyls.edu/sba/index.php\" onClick=\"ddaccordion.collapseall('expandable'); \" class=\"here\"><b>Home</b></a></h3>");
    if (($_GET['cID'] == '37') || ($_GET['cID'] == '38') || ($_GET['cID'] == '39'))
    	print("<h3 class=\"menuheader expandable\" onClick=\"ddaccordion.collapseone('subexpandable',0); \"><b>About Us</b></h3>");
    	else
    	print("<h3 class=\"menuheader expandable\" onClick=\"ddaccordion.collapseall('subexpandable',0); \">About Us</h3>");
    ?>
    <ul class="categoryitems">
    <li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/">Constitution/Bylaws</a></li>
    <?php
    if ($_GET['cID'] == '37')
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=37\" class=\"here\" onClick=\"ddaccordion.collapseall('subexpandable'); \"><b>Meetings</b></a></li>");
    else
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=37\" onClick=\"ddaccordion.collapseall('subexpandable'); \">Meetings</a></li>");
    if (($_GET['cID'] == '38') || ($_GET['cID'] == '39'))
    	print("<li><a href=\"http://www.cssdrive.com/index.php/menudesigns/\" class=\"subexpandable\"><b>Contact Us</b></a>");
    	else
    	print("<li><a href=\"http://www.cssdrive.com/index.php/menudesigns/\" class=\"subexpandable\">Contact Us</a>");
    ?>
    	<ul class="subcategoryitems" style="text-indent: 25px;">
        <?php
    	if ($_GET['cID'] == '38')
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=38\" class=\"here\"><b>Executive Board</b></a></li>");
    	else
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=38\">Executive Board</a></li>");
    	if ($_GET['cID'] == '39')
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=39\" class=\"here\"><b>Senators</b></a></li>");
    	else
    	print("<li><a href=\"http://portal.nyls.edu/sba/index.php?cID=39\">Senators</a></li>");
    	?>
    	</ul>
       </li>
    </ul>
    <?php
    if ($_GET['cID'] == '44')
    {
    print("<h3 class=\"menuheader\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=44\" onClick=\"ddaccordion.collapseall('expandable');\" class=\"here\"><b>How To Join</b></a></h3>");
    }
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\")><a href=\"http://portal.nyls.edu/sba/index.php?cID=44\" onClick=\"ddaccordion.collapseall('expandable');\">How To Join</a></h3>");
    if ($_GET['cID'] == '45')
    print("<h3 class=\"menuheader\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=45\" onClick=\"ddaccordion.collapseall('expandable');\" class=\"here\"><b>Budget Requests</b></a></h3>");
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=45\" onClick=\"ddaccordion.collapseall('expandable');\">Budget Requests</a></h3>");
    if ($_GET['cID'] == '40')
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=40\" onClick=\"ddaccordion.collapseall('expandable'); return false\" class=\"here\"><b>Student Activities Committee</b></a></h3>");
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=40\" onClick=\"ddaccordion.collapseall('expandable'); \">Student Activities Committee</a></h3>");
    if ($_GET['cID'] == '41')
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=41\" onClick=\"ddaccordion.collapseall('expandable'); \" class=\"here\"><b>Evening Division</b></a></h3>");
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=41\" onClick=\"ddaccordion.collapseall('expandable'); \">Evening Division</a></h3>");
    if ($_GET['cID'] == '42')
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=42\" onClick=\"ddaccordion.collapseall('expandable'); \" class=\"here\"><b>American Bar Association</b></a></h3>");
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=42\" onClick=\"ddaccordion.collapseall('expandable'); \">American Bar Association</a></h3>");
    if ($_GET['cID'] == '43')
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=43\" onClick=\"ddaccordion.collapseall('expandable'); \" class=\"here\"><b>Student Organizations</b></a></h3>");
    else
    print("<h3 class=\"menuheader\" style=\"cursor: default\"><a href=\"http://portal.nyls.edu/sba/index.php?cID=43\" onClick=\"ddaccordion.collapseall('expandable'); \">Student Organizations</a></h3>");
    ?>

  4. #4
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The sites located at http://portal.nyls.edu/sba. Any help is greatly appreciated.

  5. #5
    Join Date
    Aug 2004
    Posts
    9,864
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    So in other words, when someone clicks on the header "About", then the link "Meeting", you want that sub section to be collapsed instead of the current open upon going to the destination page?
    DD Admin

  6. #6
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    close... For instance say they were at the "Meetings Page", The subheaders will be open, for instance you would see Constitution, Meetings, and Contact Us. If we were to navigate away from this page, say click on "How to Join" it should collapse the "Meetings, Constitution, and Contact US" so that it can no be seen because we are no longer using any pages in that navigation

  7. #7
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    you can use http://oit.nyls.edu/CMS/SBAtest/conc...0rc1/index.php as a reference....this is the test location where the nav bar was working perfectly

  8. #8
    Join Date
    Aug 2004
    Posts
    9,864
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    So I start out at: http://portal.nyls.edu/sba/, click on "About Us" to expand the sub contents, then click on "Meeting". I'm taken to the destination page with the sub contents expanded already. So far so good. I then click on "How to Join", and I'm taken to the new destination page. The "About Us" header does NOT appear expanded. Isn't this what you want? I'm using FF3 btw.
    DD Admin

  9. #9
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    really? I'm using firefox 3 as well and have tested it on IE 7 along with Safari. I keep getting the same problem that when i have About Us Expanded and I click on How to Join, it jumps up but does not close the About Us. I recently moved new files over so let me know if it is still working for you. The page might have been still linking to the oit site.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •