tqExpert Help


You use the textSearch tqTag to enable display of search results mediated by the Search Suggestions module.

textSearch - Syntax

<tqtag name="search0type="textSearchsuggestionsDiv="search_suggestsuggestionsNoResults="no results found for your searchsuggestionsNoText="no text enteredwhileSearchingCaption="searching...searchInputID="searchTermsuggestionsForCaption="results for .... closeDivCaption="[x]" >

textSearch - Parameters

Parameter Name Type Mandatory Strict | Transitional Case Sensitive Description
type Text + S + must be textSearch
name Text + S + should be unique tqtag name in the template. no spaces/commas/single quote/double quotes allowed
title Alpha Numeric + S - The title of the tqtag. This title will be presented only at the back-end system.  no spaces/commas/single quote/double quotes allowed
closeDivCaption Text + S + The wording for "close suggestions window"
searchInputID Text + S + The HTML tag id the user will provide the search string
suggestions Text + S + The wording for suggestions
suggestionsDiv Text + S + The HTML div id to show suggestions
suggestionsForCaption Text + S + The wording for "results for [search string]"
suggestionsNoResults Text + S + The wording to tell the user no results found in suggestions database
suggestionsNoText Text + S + The wording to tell the user to populate the search field
whileSearchingCaption Text + S + The wording to tell the user "searching..." 

textSearch - Local Variables

Name Type Size Description
action text 100 link to search results
runSuggestions text 100  link to ajax suggestions 

textSearch - Examples

Example 1 - textSearch example with javascript and ajax to show reccomended results to the website customers
<tqtag name="search0type="textSearchsearchInputID="searchTermsuggestionsDiv="search_suggestsuggestionsNoResults="no results found for your searchsuggestionsNoText="no text enteredwhileSearchingCaption="searching...suggestionsForCaption="results for .... closeDivCaption="[x]" >
<form action="@action@">
    <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>

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;}

textSearch - tqoptions

With the textSearch tqtag, you can use the following tqoptions: if.

User Notes

  Add Note

Topic: textSearch