2 Replies Latest reply: Mar 28, 2012 10:20 AM by MPiazza71 RSS

    improving FlashHelp search results

    MPiazza71 Community Member

      Hi,

       

      I came across an article on this site

       

      http://www.helpscribe.com/2008/10/improving-webhelp-search-results-in.html

       

      that replaces the function called displayTopics in whfhost.js

      with the following code :

       

       

      function displayTopics() {  var recHTML=""; var sHTML=""; var sLine="";   var foundRecTopics = 0; var foundAnyTopics = 0;  var rg = new RegExp(gsCW,"ig");  var recHead="<dt><nobr><b>Recommended topics</b></nobr></dt>"; var allHead="<br><dt><nobr><b>Other topics</b></nobr></dt>";   for(var i=0;i<gaTI.length;i++){ if(gaTI[i].sTopicTitle.search(rg)>-1){ recHTML+="<dt><nobr><a href='"+gaTI[i].sTopicURL+"'>"+_textToHtml(gaTI[i].sTopicTitle)+"</a></nobr></dt>"; foundRecTopics = 1; } else{ foundAnyTopics=1; sLine+="<dt><nobr><a href='"+gaTI[i].sTopicURL+"'>"+_textToHtml(gaTI[i].sTopicTitle)+"</a></nobr></dt>"; if(i>>4<<4==i){  sHTML+=sLine; sLine=""; } } } if(sLine.length>0) sHTML+=sLine;   if (!foundRecTopics) { recHTML+="<dt><nobr>No topics found.</nobr></dt>"; }  if(!foundAnyTopics) sHTML+="<dt><nobr>No topics found.</nobr></dt>";  sHTML="<dl>"+recHead+recHTML+allHead+sHTML+"</dl>";  var resultDiv=getElement(gsResultDivID); if(resultDiv) resultDiv.innerHTML=sHTML; } 
      
      

       

      Will this work for FlashHelp?

       

      Thanks for any advice.

      M