If you have enabled the autocomplete feature in Zoom, you will get an autocomplete dropdown on the search box that appears on your main search page -- this is the main search script, either "search.php" (if using PHP), or "search.asp", or "search.cgi", etc.
But if you have search boxes elsewhere on your website (on any page besides the search scripts mentioned above) that you have created in HTML yourself, Zoom can not automatically enhance these search boxes for you.
If you want the autocomplete feature on these manually made search boxes, you will have to add some HTML and scripting on those pages.
First, insert the following above the </head> tag:
[11/Apr/2017] EDIT: Alot of changes have occurred since this original post in 2014. Updated to reflect current version.
Note that the path to "zoom_autocomplete.js" and "zoom_autocomplete.css" needs to be altered to suit the location of the page that this code is copy and pasted into. The above assumes it is in the same directory.
Next, you will have to change your search box form HTML to have an id="zoom_query" attribute. So change from this:
To this:
Hope that helps.
But if you have search boxes elsewhere on your website (on any page besides the search scripts mentioned above) that you have created in HTML yourself, Zoom can not automatically enhance these search boxes for you.
If you want the autocomplete feature on these manually made search boxes, you will have to add some HTML and scripting on those pages.
First, insert the following above the </head> tag:
[11/Apr/2017] EDIT: Alot of changes have occurred since this original post in 2014. Updated to reflect current version.
Code:
<script type="text/javascript" src="zoom_autocomplete.js"></script> <script language="javascript" type="text/javascript"> if (window.addEventListener) window.addEventListener('load', function() { ZoomAutoComplete_OnLoad('[B]zoom_searchbox[/B]');}, false); else if (window.attachEvent) window.attachEvent('onload', function() { ZoomAutoComplete_OnLoad('[B]zoom_searchbox[/B]');}); else window['onload'] = function() { ZoomAutoComplete_OnLoad('[B]zoom_searchbox[/B]');} </script> <link rel="stylesheet" type="text/css" href="zoom_autocomplete.css" />
Next, you will have to change your search box form HTML to have an id="zoom_query" attribute. So change from this:
Code:
<input name="zoom_query" type="text" class="ariel" size="45" />
To this:
Code:
<input name="zoom_query" id="zoom_searchbox" type="text" class="zoom_searchbox" size="45" />
Comment