The search process in WebHelp isn't so much magical, as
practical. It's an
indexed search, so it makes some concessions for speed,
expecially helpful when
the project gets large.
It is complex, but for good reason. It creates
'placesholders' for each of
the navigation pane functions, and fills them dynamically
after the frames have
loaded. So, accessing the search function needs to wait for
the navpane to
load. Which loads several times, actually.
But, you don't need to know how a car works to drive it, so
all this may be
moot.
Here is a script plug-in that evokes the Webhelp Search
externally (larger
systems seem to fail on the first load)
For now, try a search for a term at a test site,
http://www.800tip.com .
To search for the term 'loan', click here:
http://www.800tip.com?loan
or, to search for the term 'editor', click here:
http://www.800tip.com?editor
.....and so on ... (if the links don't survive, paste them
into your address
bar, and search for your own terms).
the method used was to call the help as above, with the
query mark, and search
term. But first, add the following text to the bottom of the
whtbar.js file
(it should look for an onLoad event, but instead I used
setTimeout, set to
1250. feel free to adjust it.
Also, I'm not sure how you wanted to access the results, but
they are rotated
through in the DisplayTopics functions, and you can always
get them with a
'screen scraping'...
function searchC(passSearchString )
{
var onMsg=new whMessage(WH_MSG_SHOWFTS,this,1,null);
SendMessage(onMsg);
var oMsg=new
whMessage(WH_MSG_SEARCHTHIS,this,1,passSearchString);
if(!SendMessage(oMsg))
gstrSearch=passSearchString;
else
gstrSearch="";
}
lngth = (top.window.location.search.substring().length);
if(lngth > 0)
{
var passSearchString =
(top.window.location.search.substring(1, (lngth)));
setTimeout("searchC(passSearchString);",1250);
}