Skip to main content
Jeff_Coatsworth
Community Expert
Community Expert
April 13, 2015
Answered

Changing the default selected setting on the "Highlight search results" field in Search

  • April 13, 2015
  • 1 reply
  • 2261 views

Anyone know any "under the hood" changes that can be made to make the "Highlight search results" field in the Search be set to unchecked rather than checked? I can see in the SSL recipe where to enable it to appear or not appear (and change the colour of the highlighting), but nothing about making it be set to unchecked in the resulting WebHelp output (or any of the other forms of help output where it can appear).

This topic has been closed for replies.
Correct answer Jeff_Coatsworth

Got it! - Yes, it's in that whform.js file - it's this section (line 228 - hope it comes through ok):

if (gbHighlightSearch == true) {

        sForm += "</tr><tr class=\"hilite\" valign=\"middle\"><td width=\"100%\"><input type=\"checkbox\" name=\"HiLite\" checked>" + gsHiliteSearchTitle + "<br></td>";

    }

If you remove the 'checked' bit on that line it sets the state of the box to "unchecked" in the Search pane.

1 reply

Community Expert
April 14, 2015

This thread indicates it's not possible, although it is a fairly old post.

Change default setting for search highlight?

If there hasn't been a change since, I think you have to change the whform.js file in the template_stock directory, or make the change in the output every time you generate. Or possibly you could write a javascript or jquery that would change the setting in the output - that's beyond me, but certainly sounds possible in my head.

For responsive and multiscreen, you can change the setting within Robohelp. Open the search results topic, right-click on the checkbox and select Screen Layout Properties. Then in the properties pane that opens, set Checked to False. (You can also make this change in the code of the search topic.)

Jeff_Coatsworth
Community Expert
Community Expert
April 14, 2015

Thanks – I had missed that thread when I searched (mainly because the search on this forum software is terrible). I’ll poke around in the whform.js to see if there’s anything obvious in there. I wasn’t aware that you could get at it in the HTML5 flavours – haven’t done much poking around in them yet ;>)

Inspiring
March 2, 2016

Hi all

One note of possible help is this. If you are using Windows 10 as your operating system, you may find that you are unable to save the edits to these files because Windows is very protective of files it deems to be "sensitive" as these may be viewed.

One way to overcome this is to save the file to your Windows Desktop first. Then copy from the Desktop and paste into the final destination. You are normally prompted this way but after acknowledging the prompt it usually works.

Cheers... Rick


Thanks, Rick.

We're using Windows 7.

However, I did note something unusual that may be related to your comment about saving the edits.

When I noticed that the original edits weren't working, I opened the same JS file in Notepad, Notepad++, and EditPlus3. I was never prompted to save my change, and the change was only reflected in the file when I edited it through Notepad++. Quite bizarre. I took screen shots to prove it to myself and to my colleague.

Your suggestion about copying it to the Desktop and making changes is a good one.

Regards,

Carol