Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a webapp using the ArcGIS Javascript API. I noticed that when I first load the map (currently living on a development server), the infoWindow does not open (when clicking on a feature). When I refresh/reload the map, the infoWindow then works as it should. This behavior happens in both IE and Firefox. I am guessing there is some problem with my initial load, perhaps the 'init' function is loading before the libraries are finished loading somehow..? I appreciate any suggestions. Below is the the HTML setup. Currently I am using $(function () {


to add the init setup in the main .js file. Thanks, Jason


<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7", "IE=9" />

<link href="mainCopy.css" rel="stylesheet" type="text/css" />
<script src="jquery.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="http://localserver/arcgis_js_api/library/2.1/arcgis/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://localserver/arcgis_js_api/library/2.1/arcgis/js/dojo/dojox/grid/resources/Grid.css">
<link rel="stylesheet" type="text/css" href="http://localserver/arcgis_js_api/library/2.1/arcgis/js/dojo/dojox/grid/resources/claroGrid.css">
<link rel="stylesheet" type="text/css" href="http://localserver/arcgis_js_api/library/2.1/arcgis/js/dojo/dojox/image/resources/image.css">

<script type="text/javascript">
var djConfig = { parseOnLoad: true };
<!-- Tell the browse to include the dojo library -->
<script type="text/javascript" src="http://localserver/arcgis_js_api/library/2.1/arcgis/"></script>
<script src="application.js" type="text/javascript"></script>

<style type="text/css"> </style>

<body class="claro">


share|improve this question
@Craig dojo.addOnLoad and dojo.ready are the same thing: – Derek Swingley Sep 26 '12 at 22:19
Instead of wrapping your dojo.ready() call in a callback to jQuery's onLoad, put it at the top level of your script. – Derek Swingley Sep 26 '12 at 22:21
Thank I will try that. – JasonBK Sep 28 '12 at 16:14
I tried changing to just dojo.addOnLoad(init); but I am still getting the same results /// the infoWindow does not pop up on the first load of the page, but it works after refreshing the page and on subsequent page loads... – JasonBK Oct 1 '12 at 14:57
I'm not sure then. Posting a complete code sample that reproduces the issue will be the best way for us to figure this out. – Derek Swingley Oct 1 '12 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.