We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3785
    • 143 Posts
    If you don’t need QuickEdit you can choose whatever JavaScript framework you like for your MODx sites. It does not matter which one MODx uses for the manager. You can go with Mootools or also jQuery if you like. I personally recommend using Mootools 1.2 since its more reliable and its a waste of time learning syntax for an old Version.
      Medianotions – Studio für Webdesign
      http://www.medianotions.de
      • 34193
      • 330 Posts
      Quote from: Bogdan at Feb 06, 2009, 05:21 PM

      If you don’t need QuickEdit you can choose whatever JavaScript framework you like for your MODx sites. It does not matter which one MODx uses for the manager. You can go with Mootools or also jQuery if you like. I personally recommend using Mootools 1.2 since its more reliable and its a waste of time learning syntax for an old Version.

      Would normally agree with you but as I said I’m working on a project that will hopefully be of use to other modx users see http://modxcms.com/forums/index.php/topic,32390.0.html and don’t want to have to put people through the hassle of having to upgrade mootools, it needs to work as a selection of snippets and plugins with a standard install of modx.

      I don’t need quick edit and so could go this route but they might.

      I quite simply want to make one simple request command to run a single php I don’t even want to display the output of the file (maybe a small amount of error checking to make sure the script runs, but that comes later), the script above is all I will be asking it to do and so if someone can tell me or I can find the code (have had a search but all sites seem to only have the 1.2 code) to carry out this single request in v1.1 it would make the entire project more reusable.

      Hope that makes sense.
        • 3785
        • 143 Posts
        Sure, sometimes you need to take what’s already there smiley

        I have done a small AJAX thing with Mootools 1.11 myself a while a go, maybe the source is of some help for you:

        JavaScript:
        var xhrURL="get_xhr.php";
        var xhrQuerystring="inputField="+inputID;
        
        // Daten senden
        var xhrHandle=new XHR(
        {
        	method: 'post'
        }).send(xhrURL, xhrQuerystring);



        In the PHP part get_xhr.php you can just get the transmitted querystring like usual:
        $inputField=$_POST['inputField'];


        For more information and options there are also the docs for 1.11 around:

        http://docs111.mootools.net/Remote/XHR.js
          Medianotions – Studio für Webdesign
          http://www.medianotions.de
          • 34193
          • 330 Posts
          OK since I seem to be reaching a dead end as far as MODx/mootools my brain suddenly had a flash of insperation along the following line.
          1) This project is using facebook connect and MODx
          2) Does facebook have an AJAX framework
          3) If so why not use that.

          A quick search and I now feel like a complete fool for wasting some where in the region of 5 hours of my spear time trying to get this to work when I should have thought about this before.

          Don’t have time to test tonight but will try in morning.

          Thanks for all your suggestions.Quote from: Bogdan at Feb 06, 2009, 06:01 PM

          Sure, sometimes you need to take what’s already there smiley

          I have done a small AJAX thing with Mootools 1.11 myself a while a go, maybe the source is of some help for you:

          JavaScript:
          var xhrURL="get_xhr.php";
          var xhrQuerystring="inputField="+inputID;
          
          // Daten senden
          var xhrHandle=new XHR(
          {
          	method: 'post'
          }).send(xhrURL, xhrQuerystring);



          In the PHP part get_xhr.php you can just get the transmitted querystring like usual:
          $inputField=$_POST['inputField'];


          For more information and options there are also the docs for 1.11 around:

          http://docs111.mootools.net/Remote/XHR.js


          Thanks for that will look at both in morning.