We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33612
    • 6 Posts
    Is there a replacement for ajaxsearch in revo? All I see is googlesearch in the demo site. I don’t see it mentioned anywhere...

    Thanks,
    Randy
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: zoonix at Mar 24, 2010, 02:52 PM

      Is there a replacement for ajaxsearch in revo? All I see is googlesearch in the demo site. I don’t see it mentioned anywhere...
      Not at this time.
        • 33612
        • 6 Posts
        crap...
          • 30370
          • 1 Posts
          Does anybody know when the ajax search will be available?
            • 21191
            • 236 Posts
              ~Shawn Himmelberger
              Check out my MODx Development and MODx Design Company - Himmelberger Design
              • 32858 ☆ A M B ☆
              • 2 Posts
              Hi neon_eddy,
              I follow your instruction to build the ajax-search on my site. It’s amazing that it works. However, there is a challenge on paging the results, it turns me to the blank page with results and that’s not really good, I think we have to fix that again, I just cant wait for the public release of AjaxSearch.
                • 21191
                • 236 Posts
                We’re working on an add-on for it. But it’s complicated smiley

                Actually one of our developers worked on it, and he’s working on this very problem right now. I’ll have him jump in here.
                  ~Shawn Himmelberger
                  Check out my MODx Development and MODx Design Company - Himmelberger Design
                  • 14911
                  • 7 Posts
                  Quote from: xgenvn at Aug 05, 2011, 12:05 PM

                  Hi neon_eddy,
                  I follow your instruction to build the ajax-search on my site. It’s amazing that it works. However, there is a challenge on paging the results, it turns me to the blank page with results and that’s not really good, I think we have to fix that again, I just cant wait for the public release of AjaxSearch.


                  To resolve this, add the following code to the search results resource you created per the posted guide.

                  <script type="text/javascript">
                  $(document).ready(function() {
                      $(".sisea-search-form").submit(function () {
                  	$("#site-search-results").load("[[~25]]",$(".sisea-search-form").serialize()).show();
                  	return false;
                      });
                      $(".sisea-search-form input").keyup(function() {
                        if(this.value.length > 2) {
                  	$("#site-search-results").load("[[~25]]",$(".sisea-search-form").serialize()).show();
                        }
                        else {
                        	$("#site-search-results").hide();
                        }
                      });
                  });
                  </script>
                  


                  The entire guide assumes you are using the default SimpleSearch tpls. Try it out, post here with your results.
                    • 32858 ☆ A M B ☆
                    • 2 Posts
                    Hi,

                    I’ve modded my searchForm like below, not so different.

                    <form class="sisea-search-form" action="search.html" method="get" id="search">
                    <input type="text" name="search" value="Enter your keywords..." maxlength="30" class="inputbox" size="30" title="Enter your keywords to process" >
                    <input type="hidden" name="id" value="41"> </form>

                    Okay, that’s all I have it rendered, and 41 that’s my landing page.

                    The problem is, if we have more than 10 results, simpleSearch will turn the results to several pages, and when you click to the page links, it will head you to the blank document with the results land on.
                    I think we have to fix the simpleSearch to replace the pagelink by a ajax load function with certain params: landingID and siteOffset.
                    I dont think I’ve missed somewhere on the tutorial.
                    Any idea please?
                      • 32858 ☆ A M B ☆
                      • 2 Posts
                      Sorry, that’s my bad. The example on modxwireframe.com works with paging, I’ve tried with essential keywords.
                      And I also find out that we actually need the handle paging link script, which isnot shown on tutorial http://himmelbergerdesign.com/blog/the-return-of-ajaxsearch.

                      We add this script below the resource which contains [[!SimpleSearch?&perpage=`5`&extractLength=`150`]]

                      [[!SimpleSearch?&perpage=`5`&extractLength=`150`]]
                      <script type="text/javascript">
                      if(typeof jQuery !== undefined) {
                      $(document).ready(function() {
                      $(".sisea-page a").click(function(event) {
                      event.preventDefault();

                      $("#search-results").load($(this).attr(’href’),$(".sisea-search-form").serialize()).show();
                      return false;
                      });
                      });
                      }
                      else {
                      alert("no jQuery!");
                      }
                      </script>
                      This works for paging results.
                      Thanks to neon_eddy and modxwideframe.