Select to view content in your preferred language

Items not working in certain browsers and basemap gallery troubles

2417
5
10-10-2013 11:59 AM
JessicaKnight1
Occasional Contributor
I am having a heck of a time with getting my decently basic application up and running. Running into errors that I can't seem to fix and problems in various browsers. I have posted other threads with no real answers. Hoping maybe I can get some direction here, as maybe several problems are related?

1) I have added the basemap gallery code and I get this error: Error: Permission denied for <file://> to create wrapper for object of class UnnamedClass
I am testing on my desktop, but nothing is calling any file name that I can think of, other than, again, its being run on my desktop for testing and therefore run out of an html file. This error only arises with the addition of the basemap gallery code:
//add basemap gallery
   var basemapGallery = new esri.dijit.BasemapGallery ({
    showArcGISBasemaps: true,
    map: map
   },  "basemapGallery");
   basemapGallery.startup();
  
   basemapGallery.on("error", function(msg) {
    console.log("Basemap Gallery Error: ", msg);
   });


I get this on multiple browsers.

2) In Safari, the table of contents doesn't work. I just get the title with a check box next to it, but no drop downs for other layers within it. I'm getting an error of
"XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/info?f=json. Origin is not allowed by Access-Control-Allow-Origin."
And that's it. I've gotten this error in Chrome and the ToC seems to have issues working there as well. From what I've seen, it shouldn't have any effect on it, but that's all I'm getting. I'm using this: http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109

3) I'm using this example: https://developers.arcgis.com/en/javascript/jssamples/query_buffer.html
It works great in all browsers except Internet Explorer. I will get the buffer to show up, but the points selected do not show up. I just get a generic error of "Error: Access is denied." No other explanation.
(Side note - anyone know how to format the info window to be more like the result in the identify task? I've played around with it and can't get it to work how I want it)



I have attempted to put my code into a fiddle because its too large to attach in a single post but its not displaying right. Here is the link to it anyway http://jsfiddle.net/jessabug/hdk8F/
Any other way to get all my code into here easily?

I could definitely use a hand. I don't feel like I'm doing anything too complicated yet, but I'm not a programmer by trade so I've been teaching myself how to do this as I go and its proving to be enjoyable sometimes, frustrating at others. I want this to work in at least 2 browsers consistently (it was working in FF and Chrome before with no issues, then Chrome didn't want to load the ToC a week or so ago. Now it seems to work and I've not changed anything). I also want to add more functionality but I hate adding more and more errors to the equation and I'd like to solve what is here first before moving on.

Any help would be much appreciated. Thanks.
0 Kudos
5 Replies
JonathanUihlein
Esri Regular Contributor
Hey jdkitzmi,

1) What webserver are you using to run the app locally on your machine? (IIS, apache, etc)

2) Might be a proxy issue. Make sure your proxy is set up correctly.

3) What version of IE are you using? The sample (https://developers.arcgis.com/en/javascript/jssamples/query_buffer.html) works on my end in IE10 (I also tested IE9; it works but its incredibly slow).

I'll check out your jsfiddle in a few minutes and get back to you.

*edit

For the future: To quickly get your jsfiddle to work properly, you can just post all of your code inside the "HTML" window (head, scripts, styles, body... etc). It's not very clean and I don't encourage doing that often but it works if you need to make a quick jsfiddle to show functionality.
0 Kudos
JessicaKnight1
Occasional Contributor
1. Maybe I'm confused by what you mean. I'm just double clicking the HTML file and running it in my browser on my desktop. ArcServer is running on another machine and I believe its using IIS. Is this what you mean?

2. We are looking into the proxy issue. Is there any detailed information on how to set that up properly?

3. The sample works fine for me in all browsers. But I'm having issues with it being implemented with my own data. Works great in all other browsers, but it won't display selected points in IE. I'm using IE9. That "Error: Access is Denied" error is all that I get. Any way to maybe get into the error more to see exactly whats going on? It only pops up when I try to run the buffer selection so I know its related, just have no idea how since it doesn't seem to have any other information attached to the error.

Let me know if you need more information. Thanks.
0 Kudos
JonathanUihlein
Esri Regular Contributor
1. Maybe I'm confused by what you mean. I'm just double clicking the HTML file and running it in my browser on my desktop. ArcServer is running on another machine and I believe its using IIS. Is this what you mean?

2. We are looking into the proxy issue. Is there any detailed information on how to set that up properly?

3. The sample works fine for me in all browsers. But I'm having issues with it being implemented with my own data. Works great in all other browsers, but it won't display selected points in IE. I'm using IE9. That "Error: Access is Denied" error is all that I get. Any way to maybe get into the error more to see exactly whats going on? It only pops up when I try to run the buffer selection so I know its related, just have no idea how since it doesn't seem to have any other information attached to the error.

Let me know if you need more information. Thanks.


1) You need to run this file from a webserver, not the browser from your desktop. That's where your file:// error comes from. This application needs to be hosted and tested on a webserver, whether locally or on another machine. You could install IIS or apache locally and have a webserver on your desktop for testing purposes.

2) https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html

3) Very generic error; wish I could provide more info. Try steps 1 & 2 and then see if the IE9 error persists.
0 Kudos
JessicaKnight1
Occasional Contributor
Thanks for the help. I will do those things and report back.
0 Kudos
JessicaKnight1
Occasional Contributor
I definitely want to thank you for your help. Testing on the webserver and setting up the proxy seems to have solved a lot of the problems. The biggest is that things work in IE as they should now.

I'm still not getting the ToC to show up in Safari though. No other errors than the XML error. The ToC is supposed to work in Safari. Works great in all other browsers (most of the time at least...it decided not to load up in Chrome for a few days a few weeks ago with no code changes). Any thoughts?
0 Kudos