Skip to main content
Community Expert
October 29, 2014
Answered

Hide search highlight once in a topic?

  • October 29, 2014
  • 2 replies
  • 375 views

Hi all,

RH version: 11.0.0.179

SSL: Multiscreen HTML5 - Desktop screen profile only

IE version: 9

Is there a built-in widget/thing to add a button to a topic to hide the search highlighting? To be clear, I want the search highlight on, but I want users to be able to turn it off once they have found the topic they need. I've done a little searching in the help and online, so I suspect there isn't, but want to make sure.

If there isn't a built-in function, does anyone know if there is a way to add my own button/javascript? I can read other's code and do a little bit of scripting, but only really basic stuff.

Thanks for your help

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Willam van Weelden

The widget does the highlighting by reading the url. You will find ?rhsearch=searchstring added to the URL. Once the highlighting is applied, you can remove it with lots of JavaScript. An easier solution may be to create a button to reload the page without the highlight option in the url. A button could do:

document.location = location.protocol + '//' + location.host + location.pathname

Kind regards,

Willam

2 replies

Willam van Weelden
Willam van WeeldenCorrect answer
Inspiring
October 29, 2014

The widget does the highlighting by reading the url. You will find ?rhsearch=searchstring added to the URL. Once the highlighting is applied, you can remove it with lots of JavaScript. An easier solution may be to create a button to reload the page without the highlight option in the url. A button could do:

document.location = location.protocol + '//' + location.host + location.pathname

Kind regards,

Willam

AmebrCommunity ExpertAuthor
Community Expert
October 29, 2014

Thanks! That looks like it will work a treat.

Now to figure out where I go to get a graphic to harmonise with the website.