Latest AMD having problems with index.html file

451
2
06-10-2014 02:15 AM
SaqibAmin2
New Contributor
I had a legacy ESRI JS site, I have now upgraded this to include the latest AMD and ESRI JS API.

All the files are stored in a folder called "site", in a browser, when I type "http://site/gis.html" ("gis.html" was added in the site properties in IIS), the new AMD site loads with no errors and functions perfectly in all browsers, Firefox, IE, Chrome. When "http://site/" is typed part of the page loads, without the map etc and displays the following errors in the console:


"NetworkError: 504 Unknown Host - http://infowindow.js/" --------------------------- infowindow.js

Error: scriptError ------------------------------------------------------------------- init.js (line 15)

...a){return"[object Array]"==r.call(a)},f=function(a,c){if(a)for(var d=0;a;)c(a...

src: dojoLoader -------------------------------------------------------------------- init.js (line 41)

info: ["//InfoWindow.js", error ] ----------------------------------------------------- init.js (line 41)

. ---------------------------------------------------------------------------------- init.js (line 41)


As a test, I copied the old site over and just typing "http://site/" and this as expected calls the "gis.html" file and the whole site loads.
0 Kudos
2 Replies
JeffPace
MVP Alum
I have noticed this as well but only on android.

what web server are you using?
0 Kudos
SaqibAmin2
New Contributor
I am using IIS 6.0

In the console, when it refers to InfoWindow.js it can't find it, maybe in the html the directory structure is odd?

Since InfoWindow.js is loaded through dojoConfig, I have taken the javascript file declaration out:

<script type="text/javascript">
 var dojoConfig = {
  parseOnLoad : false,
  async : false,
  packages : [ {
   name : "myModules",
   location : location.pathname.replace( /\/[^/]+$/, "/myModules")
  } ] };
</script>
0 Kudos