psm1988

Not getting any result in my javascript code.

Discussion created by psm1988 on Jun 18, 2012
Latest reply on Jun 19, 2012 by psm1988
Hello,
i am using this sample code.

<html>
<head>
  <title>Test map</title>
  <meta http-equip="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.4/js/dojo/dijit/themes/tundra/tundra.css">
  <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.4"></script>
  <script>
   dojo.require("esri.map");
  
   var map, tiledMapServiceLayer;
   function init(){
    map = new esri.Map("mapDiv");
   
    tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
    map.addLayer(tiledMapServiceLayer);
  
   }
  
   dojo.addOnLoad(init);
  </script>
 
</head>
<body>
  <div id="mapDiv" class="tundra" style="width:800px; height:600px;">
</body>
</html>


Now instead of default mapService, i give path of my MapService which is

"http://gise-lab-int1:8399/arcgis/rest/services/Test2/MapServer"

I have checked this link on browser, my rest service is enable.
Now when i run html file in web browser i do not get any result. It is showing blank only. For original file i get an output.

I have run this code from server also. I have checked with Chrome and Firefox browser. Original code is running perfectly.

Can anyone help me please?

Pratik Mehta

Outcomes