We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5301
    • 25 Posts
    Hi Folks,

    I have a treeview drop down jquery menu.
    I have 3 nested levels.
    At the bottom of the level is a document/node.
    When clicking this document/node, the right screen of this doc displays 4 tabs.
    Each tab contains information from MySQL in tabular formats.

    1- How can I cause the data retrieval events to occur ie retrieving data from MySQL for tables in the tab for display, without requiring user to click the tab to retrieve tables of data for the tabs ?

    When the user clicks the bottom node/docuemnt, the right screen should display all the tables right away and not having user to wait for MySQL to populate table after clickign the document/node.

    2- How do I cause the treeview drop down menu to "keep" its memory whenever he/she moves between web pages.
    Right now, whenever user clicks on a document/node, the new page appears with collapsed treeview menu, thus requiring user to reclick to get the original drop down menu configuration back.

    Thank you for your suggestions.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      2. Use a cookie; that’s what the MODx Manager does.

      1. I’m not sure what you mean. By the "bottom" of the tree, do you mean the root nodes? You can use AJAX to populate any container element with data returned from the AJAX processor (which can be a snippet on a MODx resource with no template to make things easier). So if your user clicks on an element in the left menu, it would trigger an AJAX request with the necessary information for the processor to make the appropriate query and return the appropriate data, which the AJAX post-processor would load into the specified HTML container element.

      http://docs.jquery.com/Tutorials:Quick_and_Dirty_Ajax_%28Screencast%29
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org