Google Maps Not Working in IE 6.0

Posted on the December 26th, 2008 under Codinggg.., Google, PHP by Shailesh Patel

I am working on a page where I have a google-powered map (just like the one you find on maps.google.com. It works just fine in FireFox (of course), safari, chrome and IE 7 but in IE 6, I am getting a nothing in map div. The page loads fine, but then just when you think you are in the clear, I get Nothing comes up in the FireFox console, and no little alert icon in IE. And, what’s more frustrating is that has no content. What’s up with that?!?

The reason why this works is it loads the google map information last (even after the body onload event). This works for all browsers.  And thats why I do some scripting as below,and problem is solve :)

Put this entire script inside of your <head> tags.

<script type=”text/javascript”>
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != ‘function’) {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
//Setup the map
addLoadEvent(function() {
load();
showAddress(“raleigh, nc”);
})
</script>
Share and Enjoy:
  • Google Bookmarks
  • LinkedIn
  • Facebook
  • Twitter
  • StumbleUpon
  • Technorati
  • Digg
  • del.icio.us
  • MySpace
  • Reddit
  • Live
  • Netvibes
  • Yahoo! Bookmarks
  • Mixx
  • Print
  • email
  • Blogosphere News
  • Sphinn
  • RSS

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>