Select to view content in your preferred language

Reference the ArcGIS API for JavaScript using StealJS

763
3
Jump to solution
05-03-2013 07:41 AM
SongHu
by
New Contributor
Hi,
Has anyone tried to reference the ArcGIS API for JavaScript using StealJS instead of adding

<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>

to the <head> tag?

I tried to use:

steal("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/")
    .css("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri")

but StealJs thinks i am looking for "http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/.js" and reports not found(404).
0 Kudos
1 Solution

Accepted Solutions
JeffJacobson
Frequent Contributor
Hi,
Has anyone tried to reference the ArcGIS API for JavaScript using StealJS instead of adding

<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>

to the <head> tag?

I tried to use:

steal("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/")
    .css("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri")

but StealJs thinks i am looking for "http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/.js" and reports not found(404).


I don't know what StealJS is, but if it requires a path to a JS file you can probably use one of the following URLs

View solution in original post

0 Kudos
3 Replies
JeffJacobson
Frequent Contributor
Hi,
Has anyone tried to reference the ArcGIS API for JavaScript using StealJS instead of adding

<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>

to the <head> tag?

I tried to use:

steal("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/")
    .css("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri")

but StealJs thinks i am looking for "http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/.js" and reports not found(404).


I don't know what StealJS is, but if it requires a path to a JS file you can probably use one of the following URLs

0 Kudos
MattLane
Frequent Contributor
This happens in jsfiddle too, you can try appending a ? after the trailing slash, or remove the trailing slash altogether.
0 Kudos
SongHu
by
New Contributor
0 Kudos