• This is a javascript / DOM related problem. Basically when a javascript function tries to generate an element and insert it to the DOM tree while the page is still loading (e.g. the page is not ready), Internet Explorer will throw an error “Internet Explorer cannot open website http://www.blahblah.com….” and then display the HTTP error page. This problem does not occur on Firefox and Google Chrome.

    Google Maps v3 Shortcode is also impacted by this issue. Basically if the page is complicated enough, while the Google Maps API javascript is trying to insert the map related elements to the page, and the page is is loading, you will see the Internet Explorer error message and get an error screen.

    To fix it, Google-Maps-v3-Shortcode.php needs to be revised. I did the following (added dependency to jQuery):
    Before line 47:
    var latlng = new google.maps.LatLng(‘ . $attr[‘lat’] . ‘, ‘ . $attr[‘lon’] . ‘);
    Insert the following code as line 46:
    jQuery(document).ready(function(){

    Change line 177:
    $returnme .= ‘</script>’;
    to
    $returnme .= ‘});</script>’;

    So the Google Maps API code will not draw the map until the page is completely loaded.

    http://wordpress.org/extend/plugins/google-maps-v3-shortcode/

  • The topic ‘[Plugin: Google Maps v3 Shortcode] Error working with Internet Explorer’ is closed to new replies.