<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TypeError: Cannot call method 'insertBefore' of null in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-insertbefore-of-null/m-p/437081#M40245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Welcome to the forum pavan.adiga.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A couple of things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Dojo and the jsapi have moved to AMD style coding. In the interest of creating better apps and getting help here, you should switch as soon as possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Please wrap your code in code tags. Select your code and click the code button (# sign).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) You identified the problem as inside your init function, but you didn't post it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) insertBefore is very general. This is a javascript method and a method found throughout the dojo (and jsapi) framework. Something in your code is trying to insert a dom node in a parent node doesn't exist. Identifying your issue is going to require posting more code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jan 2014 16:52:42 GMT</pubDate>
    <dc:creator>BenFousek</dc:creator>
    <dc:date>2014-01-27T16:52:42Z</dc:date>
    <item>
      <title>TypeError: Cannot call method 'insertBefore' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-insertbefore-of-null/m-p/437080#M40244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following ESRI libraries :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.map");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.layers.MapImage");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.layers.MapImageLayer");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.geometry.Extent");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.SpatialReference");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.dijit.HomeButton");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.dijit.LocateButton");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.InfoTemplate");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.layers.FeatureLayer");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.ready(init);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting this error : "Uncaught TypeError: Cannot call method 'insertBefore' of null", when I run the code. The error occurs in "init.js" method of ESRI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code works fine when do not use the feature layer and comment it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.require("esri.layers.FeatureLayer"); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error only occurs in particular systems, and the code works fine in other system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is very confusing. Could anyone point what I am missing out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 07:40:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-insertbefore-of-null/m-p/437080#M40244</guid>
      <dc:creator>PavanAdiga</dc:creator>
      <dc:date>2014-01-27T07:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Cannot call method 'insertBefore' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-insertbefore-of-null/m-p/437081#M40245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Welcome to the forum pavan.adiga.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A couple of things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Dojo and the jsapi have moved to AMD style coding. In the interest of creating better apps and getting help here, you should switch as soon as possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Please wrap your code in code tags. Select your code and click the code button (# sign).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) You identified the problem as inside your init function, but you didn't post it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) insertBefore is very general. This is a javascript method and a method found throughout the dojo (and jsapi) framework. Something in your code is trying to insert a dom node in a parent node doesn't exist. Identifying your issue is going to require posting more code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 16:52:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-cannot-call-method-insertbefore-of-null/m-p/437081#M40245</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2014-01-27T16:52:42Z</dc:date>
    </item>
  </channel>
</rss>

