BUG

Incorrect hyperlinks in an HTML Viewer query result

Last Published: April 25, 2020

Description

When attempting to use hyperlinks in a query result, a "page not found" error is returned.

Cause

The HTML Viewer code searches the hyperlink prefix and hyperlink suffix based on the hyperlink field name and returns the corresponding values from the last matching field name. As a result, if multiple layers have the same hyperlink field name, it will sometimes use the hyperlink prefix and/or hyperlink suffix from a different layer.

Workaround



  1. Open the displayAttributeData.htm file from the ArcIMS/website/<website_name> folder and find the following line:

    Code:
    if (showHyper) {

  2. Replace the code below

    Code:
    if (showHyper) {
    for (var s1=0;s1<t_id.hyperLinkFields.length;s1++) {
    if (t_id.hyperLinkFields[s1]==fName1[f]) {
    var theLinkURL = t_id.hyperLinkPrefix[s1] + fValue1[f] + t_id.hyperLinkSuffix[s1];
    document.write('<a href="' + theLinkURL + '" target="_blank">');
    isHyper=true;
    }
    }
    }

    with the following code:

    Code:
    if (showHyper) {
    for (var s1=0;s1<t_id.hyperLinkFields.length;s1++) {
    //New Line added to workaround hyperlink problem
    if(t_id.LayerName[t_id.ActiveLayerIndex]==t_id.hyperLinkLayers[s1]){
    if (t_id.hyperLinkFields[s1]==fName1[f]) {
    var theLinkURL = t_id.hyperLinkPrefix[s1] + fValue1[f] + t_id.hyperLinkSuffix[s1];
    document.write('<a href="' + theLinkURL + '" target="_blank">');
    isHyper=true;
    //new line added to workaround hyperlink problem
    break;
    }
    //new line added to workaround hyperlink problem
    }
    }
    }


    Note:
    For a description on creating hyperlinks in an HTML Viewer, see the "Creating Hyperlinks" chapter on page 26 in the "Customizing ArcIMS:HTML Viewer" document.


    Note:
    If the 'identify all' tool is being used, a similar change needs to be made in the displayAttributeDataAll.htm file.

Article ID:000006450

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