Results 1 to 6 of 6

Thread: Accordion menu - changing menu staus from different menu

  1. #1
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion menu - changing menu staus from different menu

    1) Script Title: ddaccordion.js

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

    3) Describe problem: I'm using the accordion menu and it's working very well. I have 2 menus on the same content page (left and top) and the left menu is set up using the accordion script. I would like to be able to click on the top menu and collapse/expand the portions of the left menu that correspond. I can use the collapseall function to collapse but when trying to use the expandone function I just can't figure what goes in the 'selected' variable. This was my approach and if there is a better way, I would appreciate some help.

    Thanks,
    Mike

    http://exeedra.kistenterprises.com/exeedra.htm

  2. #2
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ddaccordion.js scripts

    I can't believe that no one here knows anything about the functions contained in ddaccordion.js. There has to be a very simple solution for using these functions (expandone, collapseone, toggleone, etc). You only have to pass the "headername" and "selected" to the functions as parameters. The headername is no problem but everything I try to pass as selected doesn't seem to work.

    I did write a new function to make things work but when I use the top menu and then return to the left menu the submenu will not collapse when choosing another menu item. I think it would be a lot easier to just use the ddaccordion.js functions if I only could make sense of the script.

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I'm actually more confused on the question itself. Try to cut out everything but the exact area you have trouble doing. All I got so far is that you're asking about the "index" parameter of say:

    Code:
    ddaccordion.expandone('header_class', index)
    But what about it?

  4. #4
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion menu - integrate 2 menus to work as one

    First I would like to really thank you for answering my post.

    The accordion script has the word "selected" where you have put "index" and I was confused as to what parameter was supposed to be passed to that variable.

    However this approach still doesn't seem to be working for me so here is my situation:

    I have a left vertical menu operating with the accordion.js script to fill a content area via httpXMLRequest calls. This part seems to be working great.
    Now I also have a top horizontal menu that I would like when clicked to open and close the left menu's submenu blocks as if it was getting the click directly. I thought by using toggleone, expandone or collapseone that this would do the trick but there seems to possibly be a conflict between the two indexes from the two menus (the top menu does not have "expandable" class).

    Code using onclick:
    set_cookie(name, value);
    switch (value)
    {
    case '0c':
    ddaccordion.toggleone('expandable', '0', 'expand');
    loadXMLDoc('about/exoverview.txt');
    break;
    case '1c':
    ddaccordion.toggleone('expandable', '1', 'expand');
    loadXMLDoc('services/itservices/itoverview.txt');
    break;
    etc.

    It seems the "about" and "help" menu items are working but the rest are opening then closing the menus immediately instead of leaving the selected one open.

    You can see the problem at: http://exeedra.kistenterprises.com/exeedra.htm

    I'm not sure where to start to get this to function as desired.

    I hope this is clear and if you could provide any help at all I would be greatly appreciative.

    Thanks again,

    Mike

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Now I also have a top horizontal menu that I would like when clicked to open and close the left menu's submenu blocks as if it was getting the click directly.
    If I understand what you're trying to accomplish correctly, you'll want to check back in a couple of days. I'm updating Accordion Content script right now precisely to make it easy to expand certain headers on the target page via remote links with a query string added to them (ie: target.htm?mypets=1,2). I'm also extending the script with two custom event handlers that let you run your own custom code whenever a header is expanded/contracted.

  6. #6
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thanks for getting back to me so quickly. I am anxiously waiting for your new scripts and can use them to replace the cookies I am now using for remote links.

    However, the content page does not change (refresh) (exeedra.htm) with only the text file content changing via AJAX calls - so the remote links aren't necessary but I guess I will be able to write some custom code to serve the purpose. Just thought that the accordion script would work better.

    Thanks again for your help,

    Mike

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
  •