PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

autocomplete not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • autocomplete not working

    I was getting a lot of crazy suggestions when I entered a search query. I figured they were from the browser. I put autocomplete="off" in the form input element. This got rid of the spurious suggestions, but I have not been able to get the zoom autocomplete to work. I set autocomplete in the indexer. I also approved use of searchwords.log in autocomplete and set write permission on this file. I verified that search queries are being added to this log file. So far I have received no suggestions for any search terms I have entered.I must be missing something.



  • #2
    I don't think I explained very well the problem I was having. When I used the form generated by the script, everything worked well. Then I changed the setting in the indexer to not generate a form. I then inserted my own form in the template search_template.html with

    <form method="get" action="search.php"> and <input name="zoom_query" id="zoom_query" type="text autocomplete= "off">

    The autocomplete="off" was to get rid of the browser autocomplete. This worked fine as far as searching was concerned, but the zoom autocomplete wasn't working. I then discovered an article at

    https://www.wrensoft.com/forum/zoom-...e-on-your-site

    that described some changes in the html and an added script that would that would enable autocomplete on search forms on other pages. I made these change to search_template.html and that did the trick. I also changed zoom_query to zoom_searchbox in <body onLoad="document.getElementById('zoom_query').focu s()"> since the id in the <input> was changed. Everything now works fine.

    Comment


    • #3
      Glad to hear you got it working.

      If you are creating your own search form and trying to get the autocomplete script to work, a handy diagnostic is to use the browser's Console window (usually under the "Developer Tools" as in Chrome) to see what error messages may be occurring.
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        It turns out that I didn't need to insert the script and the additional links found in the article cited in my previous post. However, I did need to make the alterations to the input element of the form, namely

        <input class="zoom_searchbox" name="zoom_query" id="zoom_searchbox" type="text" autocomplete="off">

        I also made the following change to the body element

        <body onLoad="document.getElementById('zoom_searchbox'). focus()">

        With these changes to search_template.html the autocomplete works with my own search form as expected.
        Last edited by benthien; Jun-05-2018, 05:50 PM.

        Comment


        • #5
          It appears that I don't need the class zoom_searchbox either. I have found it necessary to use the id zoom_searchbox.

          Comment

          Working...
          X