We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16879
    • 87 Posts
    I’ve set up Ajaxsearch (1.1) in 0.9.5 so that a search box on the template and therefore every page delivers results to a separate landing page. This works fine. Calls for this are:

    Template : [!AjaxSearch? &AS_showResults=`0` &AS_landing=`35` &showMoreResults=`0` &ajaxSearch=`0` &AS_showForm=`0` !]
    Search Page (35) : [!AjaxSearch!]

    However, when I use an identical setup in 0.9.6 with Ajaxsearch 1.6 (bar the landing page id) I get no results on the landing page.

    Any ideas why this might be?

      • 11678
      • 160 Posts
      I was having problems not getting any results until I read that QuickEdit could cause that problem (in FF anyway) Log off QE and see if that helps
      Cheers,
      HalD
        "Today’s headlines are nothing more than whispers of history"
        • 16879
        • 87 Posts
        There was a flicker of hope there as I had QE and Firefox, but no;still no joy! Thanks anyway...
        • I just loaded it up on a 0.9.6 newly downloaded from SVN, and it’s working flawlessly, both with and without QE loaded. AjaxSearch version 1.6, of 02/18/2007.
            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
            • 16879
            • 87 Posts
            Have now got results on the landing page using the following:

            Template call : [!AjaxSearch? &AS_showResults=`0` &AS_landing=`46` &ajaxSearch=`0`!]
            Landing page call : [[AjaxSearch? &AS_showResults=`1` &ajaxSearch=`0` &AS_showForm=`0`]]

            but now the search form disappears from the landing page (I want a consistent search form at the top of every page including the landing page).

            These calls are exactly the same ones that I’ve used successfully in a 0.9.5 installation, the only difference being that the working version is sat on my local machine using WAMP5 and the not working version (0.9.6) is sat on a live server.

            My head is wearing down due to the scratching...
              • 11678
              • 160 Posts
              Susan; Interesting. I can’t get it to work unless QE is logged off. If you wouldn’t mind, what are your calls that work?
              Cheers,
              Hal D
                "Today’s headlines are nothing more than whispers of history"
                • 11678
                • 160 Posts
                My AjaxSearch is not working correctly even with a basic call of [!AjaxSearch!] .
                Is this code correct? Is it supposed to be commented out? It is a clip out of View Source in FF WebDeveloper tool;
                <!-- MODx registered -->
                
                  <script type="text/javascript" src="assets/snippets/AjaxSearch/AjaxSearch.js"></script>
                	<script type="text/javascript">
                		<!--
                		stripHtml = 1;
                		stripSnip = 1;
                		stripSnippets = 1;
                		useAllWords = 0;
                		searchStyle = 'partial';
                		minChars = 4;
                		maxResults = 6;
                		showMoreResults = 0;
                		moreResultsPage = 0;
                		as_language = 'english'
                		extract = 1;
                		liveSearch = 0;
                		docgrp = '';
                		highlightResult = 1;
                		-->
                	</script>
                

                Thanks,
                Hal D
                  "Today’s headlines are nothing more than whispers of history"
                • MODx 0.9.6 RC1 rev 2440, AjaxSearch 1.6, [!AjaxSearch!]

                  You can see for yourself; http://migwan.sottwell.com/ - this is the "site unavailable" page as this is only a demo waiting approval for full development, but the search works. Trust me, it still works when logged in!

                  I do see in the source when logged in that both the AjaxSearch and the QuickEdit are loading the same mootools.js file, <script type="text/javascript" src="manager/media/script/mootools/mootools.js"></script>

                  And yes, that commenting doesn’t hurt anything; it’s to block it from ancient browsers that will try to display the javascript code instead of executing it.
                    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
                    • 11678
                    • 160 Posts
                    Susan; Thanks much for the reply. When I have QE logged off I get search results below the entry box - but - it doesn’t push anything down, it just overlays it and it is transparent and what is underneath shows through. Is that the way it is supposed to work? I see how it works on your Migwan sit,e but you have nothing below the search box so I can’t tell if it is overlaying or pushing down.
                    Hal D
                      "Today’s headlines are nothing more than whispers of history"
                    • That’s the expected behavior Hal, and how it was designed for the demo content: like a dropdown menu. smiley
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me