dojo.require("agsjs.dijit.TOC");

616
4
01-04-2013 07:42 AM
JoseSanchez
Occasional Contributor III
Hi,

I copied the source code from this page in my project and it works fine with version v=2.4  but in my form I am running  v=3.2 it crashes.

how can I make it work in version v=3.2?


http://gmaps-utility-gis.googlecode.com/svn-history/r354/trunk/agsjs/examples/toc.html


  <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4">
        </script>



    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2">
    </script>
0 Kudos
4 Replies
CraigMcDade
Occasional Contributor III
what build of the TOC are you using? I am using version 3.2 of the API and build 2.04 of the TOC and it works fine.

 var djConfig = {
              parseOnLoad: true,
              packages: [{
                "name": "agsjs",
                "location": location.pathname.replace(/\/[^/]+$/, "")+'/Path/To/agsjs',
                "location": 'https://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/2.04/xbuild/agsjs' // for xdomain load
              }]
            };
0 Kudos
JoseSanchez
Occasional Contributor III
Hi,

where do I find the build of the TOC?

I just copied your var djConfig   and it worked thank you.



what build of the TOC are you using? I am using version 3.2 of the API and build 2.04 of the TOC and it works fine.

 var djConfig = {
              parseOnLoad: true,
              packages: [{
                "name": "agsjs",
                "location": location.pathname.replace(/\/[^/]+$/, "")+'/Path/To/agsjs',
                "location": 'https://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/2.04/xbuild/agsjs' // for xdomain load
              }]
            };
0 Kudos
CraigMcDade
Occasional Contributor III
it'll be at the very top of your code just above the dojo.require statements. You should make sure your agsjs folder is referenced properly in this code as well.
0 Kudos
JohnGravois
Frequent Contributor
i confirmed the same.  perhaps you could mark craig's post as the answer?
0 Kudos