We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    This question is related to MODx to the extent that the issue has cropped up on an Evo site. Beyond that ...

    So I’ve got a bit of javascript from scriptocean that sets up a fade/highlight among a small number of images on a page and it is called in a template used by almost all pages on a site. Each time one goes to a new page, the whole shootin’ match reloads - even though none of the code or images are any different. So there’s a time lag that conceivably doesn’t need to exist.

    The question is whether or not there’s a way to "carry over" the original instance without triggering the reload? I’ve thought about trying to put the call on it’s own page and then referencing it in an iframe, but can’t honestly say why I think that should work. There’s no obvious parameter to tweak in the scriptocean wizard that I can see.

    So I thought some of the folks here might have a suggestion, given that I’m no javascript wizard.

    Any constructive ideas? Thanks in advance, Matt
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      I don’t think you can, Matt.
      Unless you play with cookies.
        Rico
        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
        MODx is great, but knowing how to use it well makes it perfect!

        www.virtudraft.com

        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

        Maintainter/contributor of Babel

        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
        • 29019 ☆ A M B ☆
        • 104 Posts
        If you’re not a JavaScript wizard this might not be the solution for you, and I’ve never played with scriptocean so I have no idea if there’s any support for it, but it sounds like you could download the data (content, titles, introtext, whatever) with an AJAX call and insert the content into the same template.

        This approach is not always very search engine friendly unless you get really trixy, but it would definitely cut down on reloading the page every time.

        It’s not always easy to insert it from scratch, but perhaps that could get you searching in the right direction as far as scriptocean is concerned.
          www.darkstardesign.com

          Are you in the Nashville area? Join us for our next MODX meetup!
          • 3749
          • 24,544 Posts
          It might help if you leave the page cached. Snippets on the page (and, in Revolution, other elements as well) can remain uncached.
            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