Hi Robert, I posted to jsfiddle but it's not functional - I got errors adding my external resources because some of them are http and not https? You wouldn't be able to see my map layers anyways as they are on our intranet.
The test for layer.loaded is in the function mapLoad, near the bottom of the js code. Switching out for our non-secured layer (layerCadastral) this works as intended - so if I put an error in the path for layerCadastral, loaded = false and if I leave the correct url, loaded = true.
I just can't figure out why I would be getting a security error, while the layer seems to load fine and is totally accessible.
Specifically, this is what comes up in the NetBeans console:
Failed to load resource: the server responded with a status of 401 (Unauthorized) (13:05:43:872 | error, network)
at http://[private server]/arcgis/rest/info?f=json
XMLHttpRequest cannot load http://[private server]/arcgis/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access. The response had HTTP status code 401. (13:05:43:873 | error, javascript)
at public_html/MOR.html