On 4 February 2011 15:14, Mark <[email protected]> wrote:
>
> I'm using V3 for the first time and I went off of the examples Google
> gives in their documentation. Long story short, I'm trying to load
> several maps on one page--all pointing to different locations. It
> works in Firefox & Chrome, but not in any of the IEs.
>
> I get an error stating: "Object doesn't support this property or
> method..." on Line 88. Which is essentially this line:
>
> maphq = new google.maps.Map(document.getElementById("maphq"),
>                                mapOptions);
>
>
> Live version of where I'm debugging: http://tiger.atlanticbt.com/Locations
>

You *must* use the var keyword when declaring variables in IE. It's
always good practice; but IE's behaviour requires it.

IE "helps" by implicitly defining a variable which refers to each page
element. As you have an element called "maphq", IE has created a
variable which refers to it, called "maphq". That is, there is an
implicit global definition statement
  var maphq=document.getElementById("maphq");

What you need to do is to redefine IE's shortcut variable, and to do
that you need an explicit definition with "var" yourself.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to