We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    I had the same problem with the older version, try calling it uncached and see if it makes a difference:

    [!AjaxSearch.........!]
      • 22563
      • 63 Posts
      template:
      [!AjaxSearch? &AS_showResults=`1` &AS_landing=`6` &moreResultsPage=`6` &showMoreResults=`1` &addJscript=`1` &extract=`1`!]

      results page:
      [!AjaxSearch? !]

      if I disable java script the search loads the results page but no result are displayed.
        • 8619
        • 229 Posts
        The results page needs to be styled also:

        http://modxcms.com/forums/index.php?PHPSESSID=211e1aa09be1028b6173fe033a844801&topic=10467.0;wap2

        So, your template call is fine, but on the results page it should be like this:

        [!AjaxSearch? &AS_showResults=`1` &addJscript=`1` &extract=`1`!]

        I believe that will work, but I know that the results page needs more than just [!AjaxSearch!].....hope that helps some and gets you started in the right direction.

          • 1511
          • 144 Posts
          Well, in my template I had a non-cached call [!AjaxSearch!], and my result page was not cached, so I needed a cached call [[AjaxSearch]].

          I believe it’s a MODx issue and you have to have alternating calls, starting with the page setting and then toggle it for every level of snippet call nesting.

          cached document / noncached call / cached call
          or
          non-cached document / cached call / non-cached call
            • 8619
            • 229 Posts
            Ok, I am just using all results on my one page, so I wasn’t familiar with that....

            Did the styling of the results page for you help or work?
              • 1511
              • 144 Posts
              The styling has nothing to do with the results (except if you set display:none to all elements. smiley).
              If you omit the styling all you get is a bunch of text all crammed together with links. wink

              Now I’m coping with the following problem:

              My template call looks like
              [!AjaxSearch? &AS_showForm=`1` &language=`slovenian` &AS_landing=`30`  &addJscript=`1` &extract=`1` &AS_showResults=`0` &ajaxSearch=`0`!]
              and my call on page 30 looks like
              [[AjaxSearch? &AS_showForm=`0` &AS_showResults=`1` &language=`slovenian` &ajaxSearch=`0` ]]

              I want the template search form visible at all times, I want no form on the results page.

              But when the result page is shown, there is no form on either place.
              If I set &AS_showForm=`1` on the results page, only that form is shown.

              I gather this is not the intended behavior.
                • 8619
                • 229 Posts
                Sorry about the confusion when I said ’styling’, I should have said ’call’ for the snippet on the results page.

                As far as the form showing vs. not showing up, are both the pages using the same template? Are you using the AjaxSearch call on the template, and then is your page for the results using the same template? Not sure if that could be a conflict or not, but might check it.

                  • 1511
                  • 144 Posts
                  Yes, checked that one. Same template.
                  Results showing but the template call search form is hidden.

                  I’ll go and dig into the code...
                    • 17429
                    • 18 Posts
                    Hey everyone! This is my first post in this forum, so forgive me any protocol breaches, please! grin

                    Anyhoo, I’m trying to use ajaxsearch, and it’s working splendidly except for a few things:

                    1) I’m getting a ’flickering’ as the search results come up, as in the box opens, closes, opens, closes, a few times before the results are displayed. Is there any way to delay the box from expanding until after ajaxsearch is done doing whatever it needs to do in order to display the full results?

                    2) When I search, I seem to be getting relevant pages even if they are marked as ’unsearchable’ (or rather, not marked as searchable). Is there any known way to get ajaxsearch to respect the ’searchable’ tag?

                    Thanks in advance. If I’ve failed to provide any critical info, please let me know.

                    Thanks!
                      • 19889
                      • 616 Posts
                      Quote from: andrazk at Feb 22, 2007, 08:48 AM

                      Yes, checked that one. Same template.
                      Results showing but the template call search form is hidden.

                      I’ll go and dig into the code...

                      I’m experiencing the same issue - on the result page, the search field in the header of the page that is included in my template just disappears - is there a way around this?

                      This discussion is closed to further replies. Keep calm and carry on.