[OpenLayers-Dev] occasional alpha hack error with FF 3

Zac Spitzer zac.spitzer at gmail.com
Mon Jan 12 08:20:20 EST 2009

this code for detecting IE is throwing warnings in firebug

OpenLayers.Util.alphaHack = function() {
    if (OpenLayers.Util.alphaHackNeeded == null) {
        var arVersion = navigator.appVersion.split("MSIE");
        var version = parseFloat(arVersion[1]);

Unexpected value undefined parsing r attribute.
[Break on this error] undefined
Util.js (line 414)

(my line numbers are a bit out as i have the $ stuff commented out as
I found IE gets
confused with jquery)

shouldn't there be a be a check to see if the array has two elements
before checking it?


var arVersion = navigator.appVersion.split("MSIE");
if(arVersion.length === 1)
 OpenLayers.Util.alphaHackNeeded= false;


Zac Spitzer -
+61 405 847 168

More information about the Dev mailing list