Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

IE7 Javascript error #330

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

IE7 Javascript error #330

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: david[at]frankieandshadow.com
[Submitted to the original trac issue database at 4.58pm, Saturday, 2nd December 2006]

IE7 reports "Unspecified error" (how helpful!) at line 131 char 182, which I assume is this line...

if(OpenLayers.Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}while(element=element.parentNode);return[valueL,valueT];};var Rico=new Object();Rico.Corner={round:function(e,options){var e=$(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement")

(I had assumed this was the search box, but actually that does work, after a fashion - see next ticket).

@openstreetmap-trac
Copy link
Author

Author: david[at]frankieandshadow.com
[Added to the original trac issue at 5.26pm, Saturday, 2nd December 2006]

A bit more info. The debugger highlights this bit

if(element.offsetParent==document.body)

in the following as the error.

var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){if(evt.stopPropagation){evt.stopPropagation();}
evt.cancelBubble=true;};OpenLayers.Util.pagePosition=function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
if(OpenLayers.Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}while(element=element.parentNode);return[valueL,valueT];};var Rico=new Object();Rico.Corner={round:function(e,options){var e=$(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement")
color=this._background(e);var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent")
bgColor=this._background(e.offsetParent);this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.backgroundColor=newColor;}},changeOpacity:function(theDiv,newOpacity){var mozillaOpacity=newOpacity;var ieOpacity='alpha(opacity='+newOpacity
100+')';theDiv.style.opacity=mozillaOpacity;theDiv.style.filter=ieOpacity;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.opacity=mozillaOpacity;spanElements[currIdx].style.filter=ieOpacity;}},reRound:function(theDiv,options){var topRico=theDiv.parentNode.childNodes[0];var bottomRico=theDiv.parentNode.childNodes[2];theDiv.parentNode.removeChild(topRico);theDiv.parentNode.removeChild(bottomRico);this.round(theDiv.parentNode,options);},_roundCornersImpl:function(e,color,bgColor){if(this.options.border)

@openstreetmap-trac
Copy link
Author

Author: crschmidt[at]crschmidt.net
[Added to the original trac issue at 8.28pm, Saturday, 2nd December 2006]

It looks like this might actually be an issue in OpenLayers. If it is, it will be fixed before the end of next week. If it's not, I'll try and find the solution next weekend.

@openstreetmap-trac
Copy link
Author

Author: Sebastian[at]SSpaeth.de
[Added to the original trac issue at 11.24am, Wednesday, 16th May 2007]

Does this error still occur or has it been fixed. Not having access to IE myself, I woud be happy if somebody could test this.
Toning down to major, this is not critical in any case.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 12.47pm, Thursday, 14th June 2007]

This doesn't seem to be a problem anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant