Legend not showing up in IE

Dylan Beaudette dylan.beaudette at GMAIL.COM
Fri Apr 7 13:00:08 EDT 2006


Interesting.

Fixed the empty color string.

I have been puzzling over the "document.layers" error on the javascript 
console for a while now.

Looking into the source of the main landview application source file, i see a 
couple references to document.layers:

function checkLegendControls(element) {
 
 for (var i=0; i<element.length; i++) {
    var maxscaleObj = eval("document.layers." + element[i].value + 
"Maxscale");
    var minscaleObj = eval("document.layers." + element[i].value + 
"Minscale");
    if (maxscaleObj) {
      if (maxscaleObj.value < ms.getscale()) {
        disableLegendControls(element[i]);
        continue;
      }
    }
    if (minscaleObj) {
      if (minscaleObj.value > ms.getscale()) {
        disableLegendControls(element[i]);
      }
    }
  }
}


and it looks like this function is run from the postdraw() function with:
checkLegendControls(document.layers.foreground);
checkLegendControls(document.layers.background);


Note that I am not including a "layers=" string in my URL passed to the 
mapserver CGI.

Cheers,


On Friday 07 April 2006 09:32 am, Andrew Krakowski wrote:
> My IE debugger complained about
>
> 	document.getElementById('survey_message').style.color = color;
>
> So perhaps make a default color to assign rather than an empty string.
>
> Also there are a couple JavaScript errors when you load the page in
> FireFox and the one that says "document.layers has no properties" leads
> me to suspect you are assigning or using a layer before it has data.
>
> Cheers!
> Andrew
>
> Dylan Beaudette wrote:
> > Greetings,
> >
> > Our Landview-based DHTML mapserver application works quite well on nearly
> > every web browser _except_ IE...
> >
> > Here is a link to a sample page, note that there should be a legend in
> > the upper left hand corner:
> >
> > http://tinyurl.com/mjfxk
> >
> >
> > I have browsed through the javascript libraries included in the landview
> > application, but have yet to find any thing that might be related to the
> > missing legend. I have a sneaking suspicion that it has something to do
> > with how the DBOX container is implemented.
> >
> > Any thoughts or suggestions would be greatly appreciated.
> >
> > Cheers,

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341



More information about the mapserver-users mailing list