We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18097
    • 33 Posts
    Hello

    Really strange thing... AjaxSearch seemed to work really well a month ago, but now is not returning any results when I’m logged in to the CMS.

    When I click on the ’Go’ the page refreshes but no results are showing, when I do the same once logged out of the CMS I receive the Ajax list of results as normal.

    Any ideas?

    The page is: http://www.johnstrand-mk.co.uk.server64.ukservers.net
      • 13736
      • 345 Posts
      I have a similar problem except:

      In Google Chrome the Ajax search refreshes the page (no results) in both instances. Logged in or out.
      In Firefox the Ajax search works fine in both instances (but without animation).
      In IE the Ajax search refreshes the page (no results) in both instances. Logged in or out.
      In Safari (win) the Ajax search refreshes the page (no results) in both instances. Logged in or out.


      So in summary Ajax search seems to work in Firefox while not working at all in all other browsers.
        • 5811
        • 1,717 Posts
        Which version of Php do you use ? EDIT: which version of AjaxSearch do you use ?

        So in summary Ajax search seems to work in Firefox while not working at all in all other browsers.

        With AjaxSearch 1.9.0, the demo site has been checked with FF3.5 and IE7.0
        [EDIT] and Safari 5.0
          • 13736
          • 345 Posts
          I am using AS v1.9.0 with Evo 1.0.4 which was upgraded from Evo 1.0.3 with AS v1.9.0 which had AS upgraded from the 1.8.x default.
          http://test.absolutessi.com

          I’m using a chunk to insert this call on every template:
          [!AjaxSearch? &jscript=`jquery` &addJscript=`0` &tplInput=`as_Input_tpl` &moreResultsPage=`8`!]


            • 5811
            • 1,717 Posts
            In IE the Ajax search refreshes the page (no results) in both instances. Logged in or out.
            When I am not logged in, I found results with IE7 on your site. What do you mean by "refreshes the page (no results)" ?


            EDIT:
            In Safari (win) the Ajax search refreshes the page (no results) in both instances. Logged in or out.
            When not logged in I got no results on your site. On demo site, Safari works.
              • 13736
              • 345 Posts
              In Chrome the browser page goes white and it appears to reload the same page but with a modified address.
              http://test.absolutessi.com/index.html?advsearch=oneword&search=camera

              I’m using IE8 and using IE8 with compatibility view doesn’t seem to help.
                • 5811
                • 1,717 Posts
                On your site, with Safari 5.0, with JQuery, the behaviour is different if I type the searchterm (keydown) or if use the submit button.
                It runs only when I use the submit button.


                Same thing on the demo site, with Jquery and Safari, It seems that the page is reloaded when the searchterm is typed. >:(

                It’s ok with the submit button or with the livesearch mode.
                This doesn’t occur with mootools 1.11 or 1.2.4.
                  • 13736
                  • 345 Posts
                  I can confirm that.

                  It seems to work in every browser using the Submit button but not for hitting enter from the form.

                  Another question slightly off topic. Where is the animation controlled. When I upgraded from 1.8.x to 1.9.0 the results window starting appearing suddenly instead of scrolling in. (this was regardless of mootools/jquery)

                    • 5811
                    • 1,717 Posts
                    Another question slightly off topic. Where is the animation controlled. When I upgraded from 1.8.x to 1.9.0 the results window starting appearing suddenly instead of scrolling in. (this was regardless of mootools/jquery)
                    As the animation are differently appreciated, the provided js script are the basic version. If you would like implement a different animation (fade effect for instance) you need to change the code.

                    For this take the js code, un-minfy it and adapt it to your needs.

                    For Jquery - Basic effect :
                      $.post("index-ajax.php", pars, function(data) { 
                          as['sr'].hide();                                      // Hide the searchResults window
                          as['sr'].html(data);                                  // Fill the searchResults window
                          as['sr'].show();                                      // Show the searchResults window
                          as['sc'].show();
                          as['sl'].hide();
                      });
                    }
                    
                    function closeSearch(as) {
                      as['si'].val('');
                      as['sr'].hide();                                         // Hide the searchResults window
                      as['sc'].hide();
                      as['sl'].hide();
                    }


                    Funny effect :
                      $.post("index-ajax.php", pars, function(data) { 
                        as['sr'].hide('slow').slideUp().fadeOut();             // Hide the searchResults window
                        as['sr'].html(data);                                   // Fill the searchResults window
                        as['sr'].show('slow').slideDown().fadeIn();            // Show the searchResults window
                        as['sc'].show();
                        as['sl'].hide();
                      });
                    }
                    
                    function closeSearch(as) {
                      as['si'].val('');
                      as['sr'].hide('slow').slideUp().fadeOut();                 // Hide the searchResults window
                      as['sc'].hide();
                      as['sl'].hide();
                    }


                    This is not exactly the implemented code, but this give you where do the appropriate changes.
                      • 13736
                      • 345 Posts
                      Ok. Minified is why I was having trouble finding it I think.

                      How difficult do you anticipate that it might be to debug the issue of "enter" causing a page refresh when using jQuery?