Can you explain what the error message 'Permission denied to access property 'href' from a non-chrome context' means?
Also, I'm working with overlays in OpenLayers and trying to adjust the opacity of these layers. The error is occurring in the following code...
<input id='opacity' value="1.0" onChange="changeOpacity()">
The function changeOpacity() looks like this...
function changeOpacity() {
var newOpacity = parseFloat(OpenLayers.Util.getElement('opacity').value);
newOpacity = Math.min(1.0, Math.max(0.1, newOpacity));
OpenLayers.Util.getElement('opacity').value = newOpacity;
for (var i=0; i<images.length; i++) {
layers[images[i]].setOpacity(newOpacity);
}
}
The error is being triggered at "var href = originalElement.href;" in this function...
function mD(e) {
//what is originalElement/srcElement/originalTarget?
var originalElement = e.srcElement || e.originalTarget;
var href = originalElement.href;
if (originalElement.nodeName == "A" && href.match("http://www.openstreetmap.org/browse/")) {
href = href.replace('http://www.openstreetmap.org/browse/','http://www.openstreetmap.org/api/0.6/');
if (gml) { map.removeLayer(gml); } //$("status").innerHTML = 'loading'; }
gml = new
OpenLayers.Layer.GML("OSM", href, {format: OpenLayers.Format.OSM});
map.addLayer(gml);
gml.preFeatureInsert = style_osm_feature;
var sf = new OpenLayers.Control.SelectFeature(gml, {'onSelect': on_feature_hover});
map.addControl(sf);
sf.activate();
return false;
}
}
Any help or ideas would be greatly appreciated! My browser setup is Firefox 3.5.9 with firebug 1.5.4