English

Error: Internet Explorer hangs or runs slowly when a query request is sent through ArcIMS HTML Viewer

Error Message

When a query request is sent to an ArcIMS layer through HTML Viewer, Internet Explorer returns following error message:

"A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may be unresponsive. Do you want to abort the script? (Yes/No)"

If you choose "Yes", the browser may hang or run slowly.

Cause

This problem is caused by a large volume of data passed from the ArcIMS server to the HTML Viewer client. This is typically the result of any kind of query operation that retrieves a layer's attribute data. Because of the response's large size, the JavaScript response-handling function in the HTML Viewer will require too much time and too many client-side resources to process the ArcXML response efficiently.

Solution or Workaround

In order to avoid such large ArcXML responses, be sure to limit the amount of data that can be passed at one time to the HTML Viewer. This can be achieved by following one of two options below:

  • LIMIT THE NUMBER OF RECORDS TO BE RETURNED

    By default HTML Viewer returns 25 records per GET_FEATURES request. Change this number as follows to reduce the size of ArcXML response:

    1. Open ArcIMS/website/<website_name>/ArcIMSParam.js file in a text editor and look for this line:

    Code:

    var maxFeaturesReturned=25;


    2. Change this variable to a lesser value. Use trial and error method to determine the suitable number of features to be returned.
    For example:

    Code:

    var maxFeaturesReturned=10;


  • LIMIT THE NUMBER OF FIELDS TO BE RETURNED

    If your dataset contains any fields that need not be returned to the HTML Viewer clients, you can omit them from being returned in the ArcXML response.

    1. Open ArcIMS/website/<website_name>/ArcIMSParam.js file in a text editor and look for this line:

    Code:

    var swapSelectFields=false;


    2. Change swapSelectFields to true and define the required fields for each layers as given below:

    Code:

    //If true, a list must be defined in selFieldList[n] for each layer to update selectFields
    var swapSelectFields=true;
    // array for each layer's returned fields if swapSelectFields=true
    var selFieldList = new Array();
    // sample set for world - if not #ALL#, id and shape fields required. Separate with a space
    selFieldList[0]="NAME COUNTRY POPULATION #ID# #SHAPE#";
    selFieldList[1]="URL #ID# #SHAPE#";

    Note:
    See Customizing HTML Viewer for more descriptions on setting the selection field list array.