Editing custom_linklist.js

 

 

What's covered?

To create a visible link as shown in the Demo 2, 3 and 4 files, you need to know the following:

  1. The location of the file in which the link is to appear.
  2. The location of the file or site that will be opened when the link is clicked.
  3. Whether the link will
  1. Whether the target is to open within the help or in a new window.

Detailed instructions are contained in the custom_linklist.js file. This page is intended to provide an introduction only by explaining the lines in the javascript file that are behind the demo topics.

Example 1

This example uses the default text to open a link to a file that opens in the same window.

The line in custom_linklist.js is

addLink("demo_02/demo.htm","../customer_files/procedure.pdf",null,null);

addLink The target will open in the same window.
"demo_02/demo.htm"

Enter the name of the topic where the link is to show. To identify the file name, right click the topic and select Properties.

The name only is sufficient if it is unique in the whole help system (usually the case with eFin and e5). Use sufficient of the path to make it unique

"../customer_files/procedure.pdf"

Enter the target for the link, this can be any file, an intranet or a web site.

The relative path from the file with the link (the file above) to the target file is required for this parameter.

It must be in quotes with forward slashes.

Use the server name rather than a drive letter. Use only servers to which all users have access.

null No graphic has been defined for the link so the default text will apply.
null No custom text has been defined for the link so the default text will apply.

Example 2

This example uses custom text to open a link to a file that opens in the same window.

The line in custom_linklist.js is

addLink("demo_02/demo_03/demo.htm","../../customer_files/procedure.pdf",null,"<p class=Custom>My Link</p>");

addLink The target will open in the same window.
"demo_02/demo_03/demo.htm"

Enter the name of the topic where the link is to show. To identify the file name, right click the topic and select Properties.

The name only is sufficient if it is unique in the whole help system (usually the case with eFin and e5). Use sufficient of the path to make it unique.

"../../customer_files/procedure.pdf"

Enter the target for the link, this can be any file, an intranet or a web site.

The relative path from the file with the link (the file above) to the target file is required for this parameter.

It must be in quotes with forward slashes.

Use the server name rather than a drive letter. Use only servers to which all users have access.

null No graphic has been defined for the link so the default text will apply.
"<p class=Custom>My Link</p>" My Link will appear in place of the default link text. Note the html tags that make the links look like other links in the help.

Example 3

This example uses a graphic to open a link to a website that opens in a new window.

The line in custom_linklist.js is

addLinkExternal("demo_02/demo_03/demo_04/demo.htm","http://www.w3schools.com/default.asp","../../../customer_files/learn.jpg","Click to open website");

addLink The target will open in a new window.
"demo_02/demo_03/demo_04/demo.htm"

Enter the name of the topic where the link is to show. To identify the file name, right click the topic and select Properties.

The name only is sufficient if it is unique in the whole help system. Use sufficient of the path to make it unique.

"http://www.w3schools.com/default.asp"

Enter the target for the link, this can be any file, an intranet or a web site.

The relative path from the file with the link (the file above) to the target file is required for this parameter.

It must be in quotes with forward slashes.

Use the server name rather than a drive letter. Use only servers to which all users have access.

"../../../customer_files/learn.jpg"

The path of the image required instead of text for the link.

The relative path from the file with the link to the target file is required for this parameter.

It must be in quotes with forward slashes.

"Click to open website"

Always enter text in the second null as this will be displayed when the user hovers the mouse over the image.

If the second null is left blank, the default text at the end of this file will be displayed, including the HTML style tags.

More about the first parameter

In the first set of quotes, enter the name of the file the link is to appear in.

If the file name is unique, you need only enter the file name.

If the same file name appears in more than one folder, it is necessary to uniquely identify it.

To uniquely identify the file:

1. All paths must start with a single forward slash.

2. It is not necessary to enter the full path although you can do so if preferred.  

3. All that is mandatory is sufficient to uniquely identify the file.

Examples

There are three files called demo.htm

You can enter the full path

But the following is sufficient

Changing the Default Text

The last line in the custom_linklist.js file is

outputLink("<p class=Custom>Click here for internal procedures</p>");

You can change the text and, if required, the html tags. The line must be the last line of the file, do not move it.

Donations

If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

Topic Revisions

Date

Changes to this page

21 Apr 2007

New topic.