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

    Is there a way to load a resource into a popup modal overlay on Click?
    I currently have the content permanently loaded in the footer and hidden until a button is clicked but there are a few and it's costing me valuable load times as each one calls a third party script.

    I thought if each was in a separate resource the the scripts will only load when needed?

    Thanks
    Andy
      • 42562
      • 1,145 Posts
      Use AJAX to pull the content in
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 51020
        • 670 Posts
        Yeah thanks, sorry I realise I need to call in with Ajax, but don't know how to go about this.
          • 4172
          • 5,888 Posts
          which modal do you have in mind?
          Bootstrap or something else?

          you would call the url of the resource with an ajax-request and load that content into the modal. See http://api.jquery.com/load/
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!