On Jan 20, 5:08 pm, Marcus <[email protected]> wrote:
> Andrew, you're an absolute star! Delaying until the page has finished
> loading has stopped IE throwing toys out of its pram.
> Thank's a bunch, and free beer to you :)

Well, thanks for the offer, but you've done it like this:
  <script language="javascript">setTimeout("map_init()", 3000);</
script>
which isn't good practice. It's best to move that call in its entirety
out of the table because Javascript shouldn't be included in a table.

Better still: use <body onload="map_init()" onunload="GUnload()">
which waits for the page to be finished before running map_init().

Or, if you can't do that because of your CMS, change your existing
setTimeout to window.onload:
  <script language="javascript">window.onload=map_init;</script>
although that means that you still have script inside the table, it
does the same thing as <body onload> and means that the map will
always wait for the page to be rendered.

While three seconds should be enough, what if it isn't?

Note the use of GUnload(), which is there to help with memory leaks in
IE.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to