PassMark Logo
Home » Forum

Autocomplete issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Viking
    Junior Member
    • Feb 2016
    • 16

    #1

    Autocomplete issue

    I am trying to add a search box to each page of my site. It seems to work, except the auto complete doesn't seem to "refresh" as you type. So it shows a drop down list as start to type, but words do not drop away, when the letters no longer match and if you remove all the letters and start to type a new letter, the list is still the first one.

    I am using the .asp version. All the Zoom files are in a subdirectory, /search

    Pertinent Code is below:

    HTML Code:
    <script type="text/javascript">var ZoomAutoComplete_URL = "../search/search.asp?zoom_ac=1";</script>
    <script type="text/javascript" src="../search/zoom_autocomplete.js"></script>
    <script type="text/javascript">
    if (window.addEventListener) window.addEventListener('load', function() { ZoomAutoComplete_OnLoad('zoom_searchbox');}, false); else if (window.attachEvent) window.attachEvent('onload', function() { ZoomAutoComplete_OnLoad('zoom_searchbox');}); else window['onload'] = function() { ZoomAutoComplete_OnLoad('zoom_searchbox');}
    </script>
    <link rel="stylesheet" type="text/css" href="../search/zoom_autocomplete.css" />
    
    
    <form action="../search/search.asp" method="GET">
    <input name="zoom_query" id="zoom_searchbox" type="text" class="ariel" size="25" autocomplete="off"/>
    <input type="submit" value="Search">
    </form>
    Thanks
    Eric
  • Richard
    Administrator
    • May 2010
    • 161

    #2
    Try using Developer Tools (in Firefox/Chrome Ctrl+Shift+i or Edge F12) and check the console output to trace where the issue may be (missing document elements, JavaScript error, etc).

    Comment

    • Viking
      Junior Member
      • Feb 2016
      • 16

      #3
      Hi, thanks for the quick reply. It doesn't show any errors like that. Here is a link to the page if you would like to see it for yourself.

      http://www.modular-wheelchair-ramps.com/search.aspx

      Thanks Eric

      Comment

      • Richard
        Administrator
        • May 2010
        • 161

        #4
        If you open the Network Tab in Developer Tools, you'll see that the Autocomplete is sending requests to your network when you type in your search box, e.g.

        Code:
        http://www.modular-wheelchair-ramps.com/search/search.asp?zoom_ac=1&zoom_query=test
        The response is "OK", but the content length of the reply is 0. If you paste the URL above into the address bar, you get an empty document as well. Check that you can actually get a response/load the default search page. e.g.

        Code:
        http://www.modular-wheelchair-ramps.com/search/search.asp

        Comment

        • Viking
          Junior Member
          • Feb 2016
          • 16

          #5
          Hi, when I cut and paste the
          http://www.modular-wheelchair-ramps....oom_query=test it brings up a page listing the autocomplete search terms I used last. The work test is not in the Autocomplete, but if you type folding that would be in there and you can see how the autocomplete is partially working.

          Comment

          • Richard
            Administrator
            • May 2010
            • 161

            #6
            I am strongly inclined to suggest the issue is on your server side. If I copy/paste the URL and use "folding" as the zoom_query, I get a page with couple results. Now, in the same session, if I change the query to another term, I get the same results. If I enter just the search page without any parameters while still in the same session, I get the folding results. Seems like a possible cache is being served? Cache setting issue on your server?

            Another thing you may want to check is the error log for your server. IIS may be serving a blank page on error but returning 200 OK response.

            Comment

            • Viking
              Junior Member
              • Feb 2016
              • 16

              #7
              I am still trying to get this to work. It works fine on another site I have on the same server. Are there any permissions or settings that I need to set up in IIS for the new site for the .asp version?

              Comment

              • Viking
                Junior Member
                • Feb 2016
                • 16

                #8
                It does the search once, but then if you try to change the search term, it starts showing the results page in the text box drop down list that should be the Autocomplete list.

                Comment

                • Richard
                  Administrator
                  • May 2010
                  • 161

                  #9
                  I was able to reproduce what you were experiencing on a local server when I added Output Caching in IIS for .asp pages. After removing the rule, the autocomplete started working correctly again.

                  In IIS Manager, go to your website. Open Output Caching, check to make sure .asp is not on the list. If it is remove (or edit) it and test the autocomplete.

                  Side note, you are using a older release of V7, please update to the current release if possible as many fixes/changes has been implemented since.

                  Comment

                  • Viking
                    Junior Member
                    • Feb 2016
                    • 16

                    #10
                    I did that and now the autocomplete works on that page, but when I hit search it comes up with a 500 error.
                    search.asp:1 GET http://www.modular-wheelchair-ramps....ll%2FSend+Unit 500 (Internal Server Error)

                    Comment

                    • Viking
                      Junior Member
                      • Feb 2016
                      • 16

                      #11
                      Microsoft VBScript runtime error '800a0009'

                      Subscript out of range: 'PAGEDATA_TITLE'

                      /search/search.asp, line 1169

                      Comment

                      • Richard
                        Administrator
                        • May 2010
                        • 161

                        #12
                        The error would typically indicate a corrupt index. This could be due to a bad upload or copying of the index files. The typical solution is to delete the set of index files on the server, re-index and re-upload them properly.

                        Please see this thread for more information and other possibilities:
                        http://www.wrensoft.com/forum/showth...t-out-of-range

                        Comment

                        Working...