Problem in Internet Explorer

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem in Internet Explorer

Tyler Durden
I've got a javascript error on Internet Explorer on line 50 in the
file OpenLayers/Renderer/VML.js:

/**
     * @returns Whether or not the browser supports the VML renderer
     * @type Boolean
     */
    supported: function() {
        var supported = document.namespaces;
        return supported;
    },

I'm using the trunk version.
Any ideas?
Thanks,
Tyler
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Christopher Schmidt-2
On Tue, Sep 11, 2007 at 05:56:51PM +0100, Tyler Durden wrote:

> I've got a javascript error on Internet Explorer on line 50 in the
> file OpenLayers/Renderer/VML.js:
>
> /**
>      * @returns Whether or not the browser supports the VML renderer
>      * @type Boolean
>      */
>     supported: function() {
>         var supported = document.namespaces;
>         return supported;
>     },
>
> I'm using the trunk version.
> Any ideas?

My first guess is that you're attempting to start using the OpenLayers
code before the document is fully loaded. Although most of OpenLayers
will work that way, we advise against it, and it won't work with VML in
OpenLayers.

Is this possible? If you don't think so, could you provide HTML which is
causing the problem?

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Tyler Durden
You are right Christopher.
I'm using jquery $(document).ready(function() {} and seems that won't
work, with <body initMap()> works.

Thanks,
Tyler

On 9/11/07, Christopher Schmidt <[hidden email]> wrote:

> On Tue, Sep 11, 2007 at 05:56:51PM +0100, Tyler Durden wrote:
> > I've got a javascript error on Internet Explorer on line 50 in the
> > file OpenLayers/Renderer/VML.js:
> >
> > /**
> >      * @returns Whether or not the browser supports the VML renderer
> >      * @type Boolean
> >      */
> >     supported: function() {
> >         var supported = document.namespaces;
> >         return supported;
> >     },
> >
> > I'm using the trunk version.
> > Any ideas?
>
> My first guess is that you're attempting to start using the OpenLayers
> code before the document is fully loaded. Although most of OpenLayers
> will work that way, we advise against it, and it won't work with VML in
> OpenLayers.
>
> Is this possible? If you don't think so, could you provide HTML which is
> causing the problem?
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Chris Hardin
I don't know the source, I havn't managed to trace it back to where it
is coming from. Only happens in IE and it is intermittent, sometimes
it happens and sometimes it doesn't.


On 9/12/07, Tyler Durden <[hidden email]> wrote:

> You are right Christopher.
> I'm using jquery $(document).ready(function() {} and seems that won't
> work, with <body initMap()> works.
>
> Thanks,
> Tyler
>
> On 9/11/07, Christopher Schmidt <[hidden email]> wrote:
> > On Tue, Sep 11, 2007 at 05:56:51PM +0100, Tyler Durden wrote:
> > > I've got a javascript error on Internet Explorer on line 50 in the
> > > file OpenLayers/Renderer/VML.js:
> > >
> > > /**
> > >      * @returns Whether or not the browser supports the VML renderer
> > >      * @type Boolean
> > >      */
> > >     supported: function() {
> > >         var supported = document.namespaces;
> > >         return supported;
> > >     },
> > >
> > > I'm using the trunk version.
> > > Any ideas?
> >
> > My first guess is that you're attempting to start using the OpenLayers
> > code before the document is fully loaded. Although most of OpenLayers
> > will work that way, we advise against it, and it won't work with VML in
> > OpenLayers.
> >
> > Is this possible? If you don't think so, could you provide HTML which is
> > causing the problem?
> >
> > Regards,
> > --
> > Christopher Schmidt
> > MetaCarta
> >
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>


--
Chris Hardin
Software Architect
Archetype Corporation
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

John Cole X
I'm getting this same error on IE7.  I'm loading OL via the Ajax.Net script manager and it happens randomly (70% of the time I get the error, 30% works fine).

According to the debugger, this is getting called in the pageLoad function, which is supposed to be called (according to M$) after the page has actually loaded; on my WFS marker layer.

Since it is an "Unspecified error" I'm at a loss as to how to address the problem.  I was suspecting a conflict with the Ajax.Net javascript, but Christopher's comments have me wondering again.

If anyone has ideas, I'd love to get this fixed, since most of my users are IE.

John


Chris Hardin wrote
I don't know the source, I havn't managed to trace it back to where it
is coming from. Only happens in IE and it is intermittent, sometimes
it happens and sometimes it doesn't.


On 9/12/07, Tyler Durden <tylersticky@gmail.com> wrote:
> You are right Christopher.
> I'm using jquery $(document).ready(function() {} and seems that won't
> work, with <body initMap()> works.
>
> Thanks,
> Tyler
>
> On 9/11/07, Christopher Schmidt <crschmidt@metacarta.com> wrote:
> > On Tue, Sep 11, 2007 at 05:56:51PM +0100, Tyler Durden wrote:
> > > I've got a javascript error on Internet Explorer on line 50 in the
> > > file OpenLayers/Renderer/VML.js:
> > >
> > > /**
> > >      * @returns Whether or not the browser supports the VML renderer
> > >      * @type Boolean
> > >      */
> > >     supported: function() {
> > >         var supported = document.namespaces;
> > >         return supported;
> > >     },
> > >
> > > I'm using the trunk version.
> > > Any ideas?
> >
> > My first guess is that you're attempting to start using the OpenLayers
> > code before the document is fully loaded. Although most of OpenLayers
> > will work that way, we advise against it, and it won't work with VML in
> > OpenLayers.
> >
> > Is this possible? If you don't think so, could you provide HTML which is
> > causing the problem?
> >
> > Regards,
> > --
> > Christopher Schmidt
> > MetaCarta
> >
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>


--
Chris Hardin
Software Architect
Archetype Corporation
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Vincent-Gabriel Vallée
I'm using Ext.js and got the same problem for a script running in the Ext.onReady function call which is supposed to run before the onload event. I just put the following line before the definition of that function and I didn't get the error anymore.

document.namespaces;
Ext.onReady(.....);

Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Eric Lemoine
On Nov 13, 2007 5:23 PM, vgvallee <[hidden email]> wrote:
>
> I'm using Ext.js and got the same problem for a script running in the
> Ext.onReady function call which is supposed to run before the onload event.
> I just put the following line before the definition of that function and I
> didn't get the error anymore.
>
> document.namespaces;
> Ext.onReady(.....);

We also use Ext here and also has this problem with Ext.onReady on IE
if I recall correctly. Do you understand why adding
document.namespaces fixes the problem? How did you find out?

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Vincent-Gabriel Vallée
I was *em* debugging with the old alert right before the offending statement which made the problem go away. So I tried at the start of the VML.js file. Worked too. But I don't like to modify the OpenLayers files so I tried before the Ext.onReady definition... Then I got rid of the alert. I ended up putting it in conditional compile section,

/*@cc_on
        document.namespaces;
@*/

even though non IE browsers ignore the statement.

I have absolutely no clue as to why this "appears" to solve it... At first I thought it was because of the delay caused by the alert but since removing that with only the statement, I don't know...
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Eric Lemoine
On Nov 14, 2007 9:51 PM, vgvallee <[hidden email]> wrote:

>
> I was *em* debugging with the old alert right before the offending statement
> which made the problem go away. So I tried at the start of the VML.js file.
> Worked too. But I don't like to modify the OpenLayers files so I tried
> before the Ext.onReady definition... Then I got rid of the alert. I ended up
> putting it in conditional compile section,
>
> /*@cc_on
>         document.namespaces;
> @*/
>
> even though non IE browsers ignore the statement.
>
> I have absolutely no clue as to why this "appears" to solve it... At first I
> thought it was because of the delay caused by the alert but since removing
> that with only the statement, I don't know...

IE black magic. Thanks for your feedback.

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Internet Explorer

Erik Uzureau-3
Is this something that would maybe be helpful to others?
Would anyone on this thread be willing to make a FAQ entry for this?

http://trac.openlayers.org/wiki/FrequentlyAskedQuestions

--Erik

On 11/14/07, Eric Lemoine <[hidden email]> wrote:

> On Nov 14, 2007 9:51 PM, vgvallee <[hidden email]> wrote:
> >
> > I was *em* debugging with the old alert right before the offending statement
> > which made the problem go away. So I tried at the start of the VML.js file.
> > Worked too. But I don't like to modify the OpenLayers files so I tried
> > before the Ext.onReady definition... Then I got rid of the alert. I ended up
> > putting it in conditional compile section,
> >
> > /*@cc_on
> >         document.namespaces;
> > @*/
> >
> > even though non IE browsers ignore the statement.
> >
> > I have absolutely no clue as to why this "appears" to solve it... At first I
> > thought it was because of the delay caused by the alert but since removing
> > that with only the statement, I don't know...
>
> IE black magic. Thanks for your feedback.
>
> --
> Eric
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users