You can create links to your help that automatically open the Search or Index tabs instead of the Contents tab. In addition to this, you can include index keywords or search terms in your link and the help will automatically perform the search for the keyword or search term when the user clicks on the link.
You do this by including "switches" in the URL, after the index.html reference. You can combine this with the name of a topic file that you want to open in the help at the same time.
With some browsers you can only use URL switches when your help is being accessed on a proper web server. Particularly if you are using a second-rate browser like Internet Explorer, you will not be able to use switches when opening help locally.
nav=index |
Opens the keyword index tab instead of the table of contents. |
nav=search |
Opens the search tab instead of the table of contents. |
nav=toc |
Opens the table of contents tab (redundant really, but you can use it if you must). |
search=terms |
Opens the search tab and searches for terms. You can enter multiple words, but if you do then use %20 instead of spaces to make sure that older browsers understand the URL properly. |
index=keyword |
Opens the keyword index tab and searches for keyword. This can also include spaces and here too you should use %20 instead of spaces. See below for examples. |
You just need to create an URL with the main index file name (usually index.html) and add the switches after the index file, in any order. You must use a question mark before the first switch and an ampersand (&) character between switches. Any spaces in search terms or keywords must be replaced by %20. You can include a topic filename to be opened in the list of switches, also in any order.
Important: All special characters in URLs should be percent-encoded. See this Wikipedia page for details.
Examples:
Open the help at the keyword index tab without searching:
index.html?nav=index
Open the help with at the keyword index tab and search for red shift, note the %20 instead of a space:
index.html?index=red%20shift
Open the help at the search tab and also open the topic mytopic.htm:
index.html?mytopic.htm&nav=search
Same as above, but search for the term colorful widgets (note that the order of the switches does not matter!):
index.html?search=colorful%20widgets&mytopic.htm