Microsoft JScript runtime error: 'null' is null or not an object

Last Published: April 25, 2020

Error Message

If the 'CustomFormat_Client' page in the 'Common_Maptips' sample is run, it works as expected (assuming that the USA_Data sample data is being used). If modifying or customizing the maptips in a custom application or in a Web Mapping Application created using the default template, then running the Web Mapping Application after the layers have been set for the MapTips control, the following JavaScript error may be returned:

"Microsoft JScript runtime error: 'null' is null or not an object".


This error is returned if the layer for which the MapTips content has been customized is not displayed on page load.

Causes could be that the layer for which the maptips were customized has been unchecked; or scale dependencies may be set, which is causing the layer to not be displayed on page load.

Solution or Workaround

There is one difference in the Properties of the MapTips control in the ‘Common_Maptips’ sample and a default Web mapping application. The ‘ShowOnlyWhenLayerIsVisible’ property is set to True by default, but in the sample it has been set to False.

  • Set this property to False in the custom application. Even when the layer is unchecked or the scale dependencies are set, the Web application will work fine without any errors.

Article ID:000010499

  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic