Hi list!
I ran into the same problem like John (actually just the dynamic loading of
scripts was broken), that Firefox 3.6 does not recognize Mozilla-browsers
correctly anymore. Obviously document.readyState does now exist in Firefox 3.6
too.
Thanks to Rober's suggestions I was able to solve the problems.
I tested it in IE6, IE7, IE8 and FF2, FF3.5.8 and FF3.6 - it worked fine.
Enclosed you find the patch.
Cheers,
Bernhard
Index: lib/Mapbuilder.js
===================================================================
--- lib/Mapbuilder.js (revision 4045)
+++ lib/Mapbuilder.js (working copy)
@@ -71,7 +71,7 @@
* Mozilla works fine without this function - I think it is single threaded.
*/
this.checkScriptsLoaded=function() {
- if (document.readyState!=null){
+ if (document.readyState && navigator.userAgent.toLowerCase().indexOf("ie")
> -1) {
// IE client
// Scripts are removed from array when they have loaded
@@ -121,7 +121,7 @@
this.loadOrdered = false;
break;
case MB_LOAD_CONFIG:
- if(document.readyState){
+ if (document.readyState &&
navigator.userAgent.toLowerCase().indexOf("ie") > -1) {
// IE
config=new Config(mbConfigUrl);
config.loadConfigScripts();
@@ -165,7 +165,7 @@
script.id = url;
script.defer = false; //not sure of effect of this?
script.type = "text/javascript";
- if (document.readyState && this.loadOrdered == true) {
+ if (document.readyState &&
navigator.userAgent.toLowerCase().indexOf("ie") > -1 && this.loadOrdered ==
true) {
// in IE, mark the script as ordered
this.orderedScripts.push(script);
if (!this.scriptLoader) {
@@ -175,7 +175,7 @@
// add to dom tree, except if we are using IE and want to load ordered
document.getElementsByTagName('head')[0].appendChild(script);
}
- if (document.readyState) {
+ if (document.readyState &&
navigator.userAgent.toLowerCase().indexOf("ie") > -1) {
// this is only needed for IE
this.loadingScripts.push(script);
}
Index: lib/model/Config.js
===================================================================
--- lib/model/Config.js (revision 4045)
+++ lib/model/Config.js (working copy)
@@ -259,7 +259,9 @@
/**
* Initialise the global config object for Mozilla browsers.
*/
-if (document.readyState==null){
+if (navigator.userAgent.toLowerCase().indexOf("ie") > -1) {
+ // IE
+} else {
// Mozilla
mapbuilder.setLoadState(MB_LOAD_CONFIG);
config=new Config(mbConfigUrl);
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel