<tqtag name="search0" type="textSearch" suggestionsDiv="search_suggest" suggestionsNoResults="no results found for your search" suggestionsNoText="no text entered" whileSearchingCaption="searching..." searchInputID="searchTerm" suggestionsForCaption="results for .... " closeDivCaption="[x]" >
...
</tqtag>
Example 1 - textSearch example with javascript and ajax to show reccomended results to the website customers
<tqtag name="search0" type="textSearch" searchInputID="searchTerm" suggestionsDiv="search_suggest" suggestionsNoResults="no results found for your search" suggestionsNoText="no text entered" whileSearchingCaption="searching..." suggestionsForCaption="results for .... " closeDivCaption="[x]" >
<form action="@action@">
<div>@searchTitle@</div>
<input type="hidden" name="section" value="1,2,3 [please see comment #1]" />
<button type="submit">Search now</button>
<input name="searchTerm" id="searchTerm" type="text" onkeyup="@runSuggestions@" autocomplete="off" />
<div id="search_suggest"><!----></div>
<div class="center"> <strong>Search:</strong>
<input name="searchType" type="radio" value="content" checked="checked" /> Search in site
<input name="searchType" type="radio" value="forums" /> Search in forums </div>
<input name="searchType" type="radio" value="products" /> Search in products </div>
<input name="searchType" type="radio" value="albums" /> Search in gallery </div>
<input name="searchType" type="radio" value="downloads" /> Search in downloads </div>
</form>
</tqtag>
comment #1: here you put sections you want to search in, best option is to use tqtag globals to define this values by the user
for this example to work you also need the following css code:
#search_suggest {position: absolute; left:0px; width:175px;background-color: #FFFFFF; z-index:999; border: 1px solid #000000; display:none;}
#dhtmltooltip {position: absolute;width: 150px;border: 2px solid black;padding: 2px;background-color: lightyellow;visibility: hidden;z-index: 100;cursor:question;}
With the
textSearch tqtag, you can use the following tqoptions:
if.