Skip Headers
Oracle® Universal Content Management
10g Release 4 (10.1.4)
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

Using Client-Side JavaScript for the Link

As an alternative to path-based URLs and Site Studio Contributor tokens, you can use client-side JavaScript to form the link. While this option may not be the simplest or most intuitive, it makes your links compatible with previous versions of Site Studio Contributor and the Web sites created in those versions. (Contact your site designer or site manager for more information.)

To use client-side JavaScript, perform these tasks:

  1. Open the hyperlink in the native document.

  2. Enter the text javascript:link followed by an opening parenthesis, a single quote, the content ID of the document, a single quote, a closing parenthesis, and semicolon (this is JavaScript syntax). Thus, for a document with the content ID "MyDoc1," enter:

    javascript:link('MyDoc1');
    

JavaScript-Based Link Target in Microsoft Word

JavaScript entry in the address field of a hyperlink.
Description of JavaScript-Based Link Target in Microsoft Word

  1. Close the hyperlink feature and save your document.

When you create a link this way, the document displays in the section of the Web site where it is stored. If you want to change this and have the document appear in a section of your choosing, then you would append the ID of the desired section to the content ID of the native document. Say you want to create a link to a document with the content ID "MyDoc1" to appear in the section containing the ID "23." In that event, you would use:

javascript:link('MyDoc1','23');

To create a link to another section of your site, you can also use the syntax "javascript:nodelink." To use this, you must know the ID of the section you want to link to. If you were linking to a section containing the ID "23," you would use:

javascript:nodelink('23');

To identify the ID of a section or Web site, open the content check-in page on the content server and click Browse next to "Web Site Section." In the Choose Web Site Section window, select your Web site and note the ID in parentheses next to each section.