English

Problem: The parameters passed to the HTML Viewer through a URL address are ignored.

Description

As discussed on p.18 of the PDF document 'Customizing ArcIMS - HTML Viewer,' it is possible to control the initial display of the HTML Viewer by passing specific parameters through the URL address. For example, the following URL will set the active layer when the map is initially loaded:

Code:
http://host_name/website/website_name?ActiveLayer=2

In certain circumstances these parameters are ignored by the HTML Viewer.

Cause

The map parameters in the URL are ignored if the default document of your Web site is index.htm instead of default.htm. When a browser connecting to the website loads index.htm, this file simply directs the browser to load default.htm. However, it does not redirect the URL parameters along with it.

Solution or Workaround

Here are three different workarounds:

  • Open index.htm file in a text editor from the ArcIMS/website/<website_name> folder and change the sendIt() function as follows:

    Code:

    function sendIt() {
    // this just redirects browser to default.htm
    // Necessary for servers that default to index.htm
    var webParams = document.location.search;
    document.location = "default.htm"+webParams;
    }

  • Directly reference default.htm in the URL. For example,

    Code:
    http://host_name/website/website_name/default.htm?ActiveLayer=2


  • In the Web Server software, change the default document of the Web site to be default.htm.