HOW TO

Set up hyperlinks for a Java Viewer

Last Published: April 25, 2020

Summary

Instructions provided explain how to setup sample hyperlinks for a Java Viewer.

Procedure

Follow the steps below to: setup a service with data that has a field with the hyperlink defined; create a Java Viewer; edit toolbar.htm and frame.htm.
  1. Open Author and select the Add Data button and navigate to C:/Program Files/ArcGIS/ArcIMS/Samples/TutorialData/SanFrancisco.
    Select the artgalleries shapefile, save AXL and serve in Administrator.
  2. Create a Custom Java Viewer called hyperlink with Designer.
    Create a Web site using the ArcIMS Manager Applications: Author, Administrator and Designer
  3. Navigate to C:/ArcIMS/Website/hyperlink.
  4. Open frame.htm and insert the following four lines of code:
    Code:

    <SCRIPT type="text/javascript" language="JavaScript">
    // Designer will set the next variable - theTitle
    var theTitle = "ArcIMS Viewer";
    if (theTitle.indexOf("###TITLE##")!=-1) theTitle = titleList[3];
    document.writeln("<TITLE>" + theTitle + "</TITLE>");

    var hyperLinkLayers = new Array();
    var hyperLinkFields = new Array();
    hyperLinkLayers[0] = "artgalleries";
    hyperLinkFields[0] = "WEBSITE";


    </script>
    <script language="javascript" src="default.js">
    </script>

  5. Open toolbar.htm and uncomment the first document.write statement and comment the second:

    Code:
    if (parent.useShowSelect) {
    document.write('<td align="center" valign="middle">');
    // choose between the following two calls
    // the next line will display attributes of selected features in HTML table. .
    . slower but can be customized easily

    document.write('<img src="images/attributes_1.gif" width=16 height=16 hspace=0
    vspace=1 border=0 alt="Attributes" onmousedown="showSelect(\'\');"
    onmouseover="window.status=\'Attributes\'">');

    // the next line will display attributes of selected features in Java table. .
    . faster but cannot be customized

    // document.write('<img src="images/attributes_1.gif" width=16 height=16
    hspace=0 vspace=1 border=0 alt="Attributes" onmousedown="displayAttributes(\'\');"
    onmouseover="window.status=\'Attributes\'">');

    //
    isSecond = !isSecond;
    document.writeln('</td>');
    if (isSecond) document.write('</tr><tr>');
    }


  6. Open an Internet browser and select the Web site. Select some features. Click Attributes. The generated list should contain a hyperlink.

Article ID:000007874

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic