[ka-Map-users] Re: [PATCH] Fix IE refresh
Jon Fatula
jonf at cruzio.com
Tue Jan 3 16:38:11 EST 2006
Hi, Ehud,
Thanks for your patch... when the change in kaMap.js
is added to the current CVS, your fix seems to resolve
the IE refresh bug in the case where there is only a
single mapfile defined in the $aszMapFiles array
in config.php.
When there are multiple mapfiles defined, the IE refresh
still fails for me in the call to myMapInitialized() in
startUp.js. At runtime at the entry to the call, the value of
document.forms[0].maps.selectedIndex
is -1, and oSelect.options[oSelect.selectedIndex].value can't
be evaluated.
I haven't been able to trace the underlying cause, but the
following two-line workaround added to startUp.js seems to
run cleanly in IE 6.02.2900 and in Firefox 1.5 on XP, and on
Firefox 1.03 under RedHat ES:
...
...
function myMapInitialized( eventID, mapName )
{
//alert( 'ka-Map! initialized a new map: ' + mapName );
//make sure the map is selected ...
var oSelect = document.forms[0].maps;
// begin workaround for IE failure at refresh call
if (oSelect.selectedIndex == -1)
oSelect.selectedIndex = 0;
// end workaround
if (oSelect.options[oSelect.selectedIndex].value != mapName)
{
for(var i = 0; i < oSelect.options.length; i++ )
{
if (oSelect.options[i].value == mapName)
{
oSelect.options[i].selected = true;
break;
}
}
}
//update the scales select
...
...
Thanks again!
-jon
-----Original Message-----
From: ka-map-users-bounces at lists.maptools.org
[mailto:ka-map-users-bounces at lists.maptools.org]On Behalf Of Ehud
Shabtai
Sent: Tuesday, January 03, 2006 8:50 AM
To: Lorenzo Becchi
Cc: ka-map-users at lists.maptools.org
Subject: [ka-Map-users] Re: [PATCH] Fix IE refresh
On 12/30/05, Lorenzo Becchi <lorenzo at ominiverdi.com> wrote:
> Thanks Ehud,
> I've posted your patch, it seems to work great.
Great.
I think you've missed the small change in kaMap.js. Did you exclude it
by purpose?
Ehud.
_______________________________________________
ka-Map-users mailing list
ka-Map-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ka-map-users
More information about the ka-Map-users
mailing list