Andreas Hocevar-2 wrote:
>
> Hi,
>
> document.namespaces;
> Ext.onReady(function(){
> ...
>
> Remove the document.namespaces line. Ext.onReady is fired before
> document.namespaces is available. Instead, run your code in a
> document.body.onload handler, or move your afghanistan.js script to the
> end of the document's body.
>
I've been trying to help him troubleshoot. The above doesn't seem to solve
the problem.
Something the OP forgot to note: the same (existing) code that works in
other browsers and doesn't work in IE, does not return any Javascript errors
or warnings in any browser at all. If it were a problem of an element not
having loaded when the function tries to run, that would throw an error.
Tried:
* removing document.namespaces, naming function "launch()" and adding
"onload='javascript:launch();'" to the body tag -- worked in other browsers
(still) but not in IE. No JS errors, still.
* removing document.namespaces, changing Ext.onReady(function()... to
window.onload = function()... -- worked in other browsers, not in IE. No
errors.
* removing document.namespaces, changing Ext.onReady(function()... to
document.body.onload = function()... -- crashes in all browsers; throws a
"document.body is undefined" sort of error.
* the above, plus move the JS file to after the body -- worked in other
browsers, not in IE. No errors. Same results with using Ext.onReady()
instead of the onload or with leaving in the document.namespaces; call.
One more big hint that it's not that an object is unavailable:
It just so happened that on every "worked in other browsers" case above, a
thin blue stripe would show up, which I thought was odd. Then I remembered
the map panel had headers turned off. So I set the MapPanel's header
attribute to true.
The result: the map still didn't load, but the header loaded just fine.
So I don't think we're looking at an "object isn't available" problem here
-- clearly, the object is available enough for GeoExt to successfully inject
code into the panel div. The problem somehow seems to be with loading the
map itself.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Internet-Explorer-Whitescreen-Error-tp5541342p5542035.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users