Table of Contents

Previous

Next


Modifying the Appearance of the Search Message in WebWorks Help

In WebWorks Help, when users click on the Search tab, the message “Type in the word(s) to search for:” is displayed. Once the user types in a word to search for and clicks Go, the “(Searching)” message is briefly displayed in the search results box. The appearance of these messages is controlled by the h2 and h3 HTML tags, and these tags are located in the search.js file. To modify the appearance of the search message, you need to specify the style properties for h2 and h3 tags in a separate .css file.

Note: If you customize the appearance of the search message by modifying the 'search.js' file, you will be responsible for maintaining your customizations as needed each time you update your Stationery to work with a new version of ePublisher.

For more information about override files and locations, see “Understanding Stationery, Projects, and Overrides” on page 373.

To change the appearance of the “Type in the word(s) to search for” message, create a style definition for the h2 tag. To modify the appearance of the “(Searching)” message, create a style definition for the h3 tag. After you specify the font properties in a .css file for the h2 and h3 tags, reference the .css file in the search.js file.

Note: The messages.xml file in the Formats\WebWorks Help 5.0\Files\wwhelp folder controls the message text used throughout WebWorks Help for multiple languages. You can override this file to provide customized messages for your specific needs.

To modify the appearance of the search messages

  1. If you want to override the message appearance for 'all WebWorks Help targets, complete the following steps:

  2. In your Stationery design project, on the View menu, click Format Override Directory.

  3. Create the following folder in your projectname folder, where projectname is the name of your ePublisher project:

Formats\WebWorks Help 5.0\Files\wwhelp\wwhimpl\js\scripts

  1. If you want to override the message appearance for one WebWorks Help 'target, complete the following steps:

  2. In your Stationery design project, on the View menu, click Target Override Directory.

  3. Create the following folder in your projectname folder, where projectname is the name of your ePublisher project:

Targets\WebWorks Help 5.0\Files\wwhelp\wwhimpl\js\scripts

  1. Copy the search.js file from the following folder to the scripts override folder you created within your project folder:

Program Files\WebWorks\ePublisher Pro\Formats\WebWorks Help 5.0\ Files\wwhelp\wwhimpl\js\scripts

  1. Open the search.js file you copied to your project override folder.

  2. Find the following block of code:

// Display initializing message
//

HTML.fAppend("<h2>" + WWHFrame.WWHJavaScript.mMessage.mInitializingMessage + "</h2>\n");

  1. Replace that block of code with the following code:

// Display searching message
//

HTML.fAppend("<h2 style=\"color:#FF00FF; text-decoration: underline; font-size: 12pt;\">" + WWHFrame.WWHJavaScript.mMessages.mSearchSearchingMessage + "</h2>\n");

  1. Find both instances of the following block of code:

// Display searching message
//

HTML.fAppend("<h2>" + WWHFrame.WWHJavaScript.mMessages.mSearchSearchingMessage + "</h2>\n");

  1. Replace each instance of that block of code with the following code:

// Display searching message
//

HTML.fAppend("<h2 style=\"color:#FF00FF; text-decoration: underline; font-size: 12pt;\">" + WWHFrame.WWHJavaScript.mMessages.mSearchSearchingMessage + "</h2>\n");

  1. Find the following block of code:

// Display search message and/or prepare results for display
//
if (this.mSavedSearchWords.length == 0)
}
HTML.fAppend("<h3>" + WWHFrame.WWHJavaScript.mMessages.mSearchDefaultMessage + "</h3>\n");

  1. Replace that block of code with the following code:

// Display search message and/or prepare results for display
//
if (this.mSavedSearchWords.length == 0)
{
HTML.fAppend("<h3 style=\" color:#FF00FF; text-decoration: none; font-size: 14pt;\">" + WWHFrame.WWHJavaScript.mMessages.mSearchDefaultMessage + "</h3>\n");

  1. Save and close the search.js file.

  2. Regenerate your project to review the changes.

ePublisher/2009.3/Help/02.Designing_Templates_and_Stationery/4.17.Customizing_Stationery (last edited 2009-11-16 17:10:09 by TonyMcDow)