Uncaught Error: Bundle not found: jsapi in esri , locale=en-us

1007
2
02-06-2011 08:34 PM
JohnCartwright
Occasional Contributor
Hello All,

I'm getting this error in Chrome/Safari but not FF.  Problem can be reproduced with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
    <script type="text/javascript">
   var imageParametersPng32 = new esri.layers.ImageParameters();
   imageParametersPng32.format = "png32";
    </script>
  </head>
  
  <body class="claro">
  </body>
</html>


Any ideas as to what I'm doing wrong?

Thanks!

--john
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
Your code is running before the esri API is loaded. Do something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
    <script type="text/javascript">
      function init() {
        var imageParametersPng32 = new esri.layers.ImageParameters();
        imageParametersPng32.format = "png32";
      }
      dojo.addOnLoad(init);
    </script>
  </head>
  
  <body class="claro">
  </body>
</html>
0 Kudos
JohnCartwright
Occasional Contributor
Oops - I should have seen that!  Guess that's further proof that working late is not always effective.

Thanks Derek.

--john
0 Kudos