We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    AJAX is just javascript. It’s really got nothing to do with MODx. Evo or Revo, you are free to use whatever javascript/AJAX you like. The only thing I’m not sure of is if it’s as easy to use a Revo resource with a snippet as the AJAX processor as it is in Evo.
      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
      • 21257 MODX Staff
      • 730 Posts
      It’s as easy, but perhaps a little better in Revo. If you set up a Resource as your Ajax processor you can define it’s content type as javascript or json or whatever you want.
      If you’re creating a 3rd party component, I suggest reading the Revo docs on that, since it explains how to take it a little further and abstract the processor behind a "connector".
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 14349
        • 44 Posts
        I guess what I meant was what you are referring to - Using Revo Resources w/ajax and defining content types

        I think i’ve figured out a nice way of doing it with Jquery - i’m building an ajax based front end editor for Revo (sort of like disqus commenting except for editing resources)

        I’ll need to do some reading on packaging third party components - but once I have that down I can make this available to the community
          • 6228
          • 249 Posts
          Quote from: OpenGeek at Apr 28, 2010, 08:21 AM

          If this is front-end, IMO, you could just use a Resource with a Snippet on it to handle AJAX requests/responses; much, much simpler and more elegant from my perspective. Connectors were intended for back-end functionality to be exposed across Contexts (i.e. for things like front-end editing components to make use of).
          This statement belongs in the docs. It would have saved at least one person from several sleepless nights.
            lo9on.com

            MODx Evolution/Revolution | Remote Desktop Training | Development
            • 28000 ☆ A M B ☆
            • 397 Posts
            Has anyone found a good tutorial for using a snippet and resource to make and receive AJAX requests? I have been searching and searching and have not found anything comprehensive.

            Thanks
              Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I’ve got an example of using Uploadify on my site; the tutorial itself isn’t finished, but you can log in to my Manager and view the two resources used for the AJAX processors (in the Tree they’re under the Demos -> Uploadify resources) as well as view the two AJAX processing snippets for uploadify in the Elements Snippets tab in the Demo Content category.
                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
                • 28000 ☆ A M B ☆
                • 397 Posts
                Hi Thanks ! I will check it out!
                  Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
                  • 28000 ☆ A M B ☆
                  • 397 Posts
                  Does that also work with REVO??
                    Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The principle is the same; the snippet handles the AJAX processing and it’s on a page with no template that can be used as the URL being called by the AJAX request. I don’t see why it shouldn’t work with Revo.
                      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
                      • 24531
                      • 213 Posts
                      it actually works flawlessly, i wrote manual based on this technique:
                      http://modxcms.com/forums/index.php/topic,57373.0.html