Select to view content in your preferred language

JavaScript Web Optimizer error

2393
1
07-14-2014 10:50 AM
JeffPace
MVP Alum

I am trying to use the JavaScript Web Optimizer, and i keep getting this error when i try to scan my website

Capture.JPG

        <script>

            var hostPath = window.location.pathname.replace(/\/[^/]+$/, "");

            dojoConfig = {

                parseOnLoad: false,

                        async:true,

                baseUrl: '/arcgis_js_api/library/3.9/arcgis/js/dojo/dojo',

                packages: [{name: 'org', location: hostPath + '/..' + '/mobile/org'},

                    {name: 'agsjs', location: hostPath + '/..' + '/mobile/agsjs'},

                    {name: 'com', location: hostPath + '/..' + '/js/com'},

                    {name: 'utilities', location: hostPath + '/..' + '/mobile/utilities'}

                ],

                isDebug: false,

                usePlainJson: false

            };

        </script>

        <script src="/arcgis_js_api/library/3.9/arcgis/?v=3.9"></script>

0 Kudos
1 Reply
TyroneBiggums
Occasional Contributor III

Put line 16 above line 1, maybe? I think you'll need to reference the API, on line 16, before dojoConfig. I have the API referenced as my first script element, and I have a separate config.js script element near about the last script referenced.

Might not do anything for you, but worth a try?

0 Kudos