Search Highlighting Persists in New Tab - Webhelp

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Jennifer Carroll
Posts: 3
Joined: Thu Sep 22, 2016 9:22 pm

Search Highlighting Persists in New Tab - Webhelp

Unread post by Jennifer Carroll »

Used a keyword to search our published Webhelp, and opened the topic in a new tab. Every instance of the keyword was highlighted, making the topic visually cluttered, with reduced usability. Any suggestions of how to "turn off" the highlighting after the search will be appreciated.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Search Highlighting Persists in New Tab - Webhelp

Unread post by Tim Green »

Hi Jennifer,

That is normal because the current tab already contains the URL info needed to highlight that term. What you need to do is briefly select another topic, then return to the topic you were viewing. That will clear the highlight. Depending on the skin type there are a couple of other options:
  • Standard skins: right-click on the TOC entry and select open in a new tab from there.
  • V3 Premium Pack skins: Reload the current topic with F5 or the browser's reload button.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Search Highlighting Persists in New Tab - Webhelp

Unread post by Martin Wynne »

Jennifer Carroll wrote:Used a keyword to search our published Webhelp, and opened the topic in a new tab. Every instance of the keyword was highlighted, making the topic visually cluttered, with reduced usability. Any suggestions of how to "turn off" the highlighting after the search will be appreciated.
Hi Jennifer,

It is possible to add a button and some scripting to turn off any search highlighting on a page. Something like this:

Code: Select all

<input type="button" 
 style="font-family:Verdana; font-size:14px; color:#0000FF;"
 value="remove page highlighting"
 title="click to remove any highlighting of Search results on this page"
 onclick="javascript:
   hl_str=window.location.href.split('&highlight')[0];
   hl_str=hl_str.split('&zoom_highlight')[0];

   hl_str=hl_str.split('?highlight')[0];
   hl_str=hl_str.split('?zoom_highlight')[0];

   window.location.href=hl_str;"> 
Depending on which skin you are using, that can be added to the page template, or inserted in topics or a snippet as an HTML Code Object.

It's working fine on my Webhelp. You could add an onload function to hide the button if there is no highlighting present, but I haven't bothered -- the mouse-over on the button is clear enough. Change the style and wording as you prefer.

cheers,

Martin.
Jennifer Carroll
Posts: 3
Joined: Thu Sep 22, 2016 9:22 pm

Re: Search Highlighting Persists in New Tab - Webhelp

Unread post by Jennifer Carroll »

Martin,

Thank you for the helpful information.

How can we change the highlight color? Our users are used to some kind of highlight.

Jennifer
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Search Highlighting Persists in New Tab - Webhelp

Unread post by Tim Green »

Hi Jennifer,

We need to know which skin you are using to be able to tell you how to change the highlight color.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply