douzhun8615 2011-10-25 06:58
浏览 82
已采纳

当我试图访问lightbox iframe中的谷歌地图我得到不安全的JavaScript尝试访问带URL的帧

when i 'm trying to access google map in lightbox iframe i'm getting Unsafe JavaScript attempt to access frame with URL Domains, protocols and ports must match.

my code is

<a href="#inline_demo86871" rel="prettyPhoto[inline]" onclick="response_map(86871)"><strong>Map It</strong></a>

Here i'm using pretty photo for popup lightbox depends on response_map id it loads the google map on popup.
everythng is working fine but. i'm getting the error when i'm trying to load map by clicking the anchor tag.

Unsafe JavaScript attempt to access frame with URL http://mysite.com from frame with URL http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=address&output=embed. Domains, protocols and ports must match.
  • 写回答

2条回答 默认 最新

  • douying0108 2011-11-10 13:57
    关注

    I suggest you read that tutorial: http://www.no-margin-for-errors.com/blog/2010/09/28/tutorial-opening-custom-content-in-prettyphoto/

    It will help you figure out how to open custom content (Google Maps) in prettyPhoto.

    Hope it helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?