13

Google chrome gives me this message when I am using google maps frame on my contacts page:

Unsafe JavaScript attempt to access frame with URL http://localhost/igames/index.php?page=contact_us&&lang=rus from frame with URL http://maps.google.com/?ie=UTF8&ll=44.590467,-105.820312&spn=10.747987,23.269043&t=m&z=6&vpsrc=6&output=embed. Domains, protocols and ports must match.

Is there any way to fix it?

1

4 Answers 4

6

For reference, it would seems to be a bug in Google Chrome: http://code.google.com/p/chromium/issues/detail?id=43173

Ben Lee's workaround seems to be the only workaround as long as it doesn't get fixed in Google Chrome.

Sign up to request clarification or add additional context in comments.

Comments

4

It's a bug in Chrome. To get rid of it, use the following code:

<div id="map_canvas"></div>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">

var centerNL = new google.maps.LatLng(52.093008,5.12);
var myOptions = {
  zoom: 11,
  center: centerNL,
  mapTypeId: google.maps.MapTypeId.ROADMAP,
  mapTypeControl: false,
  navigationControl: true,
  navigationControlOptions: {
    style: google.maps.NavigationControlStyle.ZOOM_PAN,
    position: google.maps.ControlPosition.TOP_RIGHT
  }
};

map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);
</script>

Replace LatLng and zoom with your own values.

Comments

0

I had the same issue when using chrome on a page with a google map iframe (untouched and pasted from the google maps site).

for me this problem was solved just by navigating my site with the www. in front of it, in spite of the url not being mencioned in the iframe or in the registration of the place.

this looks like a google maps bug.

till they solve i will redirect my trafic to the www. version (thats is the exact same).

Comments

-4

If you use an iframe then you get this error. Try to change your code to use an object tag as follows:

<object width="560" height="340">
 <param name="movie"
        value="http://www.youtube.com/v/JTttSMPz3Y4&hl=en_GB&fs=1&"></param> 
 <param name="allowFullScreen" value="true"></param>
 <param name="allowscriptaccess" value="always"></param>
 <embed src="http://www.youtube.com/v/JTttSMPz3Y4&hl=en_GB&fs=1&" 
        type="application/x-shockwave-flash"
        allowscriptaccess="always"
        allowfullscreen="true"
        width="560"
        height="340"></embed>
</object>

1 Comment

xDDD dude, how the heck is this even related to the question?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.