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

    Problem:

    when the user click on search button
    the page searchall.html will appear but due the amount of data it fetch the page take time to load
    it leaves the users a blank page.

    so is it possible to load the html/css/js first then display a progress bar in the div where the
    query is fetching data from the database so that the user will know that there is something happening in the page.

    make sense?

    thanks for reading this thread I hope you can enlighten me with this one..
      • 3749
      • 24,544 Posts
      Yes, but you would need to do it with JavaScript. Usually, in order to make it work, the search button needs to launch some JavaScript code which displays the progress bar and fires off an Ajax request to a page containing PHP which gets the data and returns it. The Ajax success function then displays the search results.

      You might look at the AjaxSearch extra as an example.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting