【问题标题】:How can I run disqus in an iframe?如何在 iframe 中运行 disqus?
【发布时间】:2009-07-03 09:58:36
【问题描述】:

我正在尝试在谷歌地图上按标记添加 disqus cmets。为了使其成为每个标记,我在信息窗口中添加了一个 iframe,每个标记都有不同的 URL。它有效,我可以发布 cmets,但成功发布后信息窗口未更新;微调器仍然存在。 Firebug 说:

Access to 'file:///foo/gmap/comments.html?dsq=12066893#comment-12066893' from script denied
redirect()thread?x...200)&cbp= (line 11)
onload(load )

HTML 代码如下所示:

我的 GMapEZ 地图

<div class="GMapEZ GSmallMapControl GSmallMapTypeControl"
    style="width: 300px; height: 300px;">
  <a href="http://maps.google.com/maps?ll=41.092104,-85.144740&amp;spn=0.006130,0.009795&amp;t=k&amp;hl=en">
    A
  </a>
  <div>
    <iframe src='comments.html'>
  </div>
</div>

cmets 页面如下所示:

<script>
var disqus_developer = "1";
</script>
<script type="text/javascript" src="http://disqus.com/forums/firehazard/embed.js"></script>

【问题讨论】:

    标签: javascript ruby-on-rails google-maps disqus


    【解决方案1】:

    根据这个线程,问题是 iframe 的刷新。 http://groups.google.com/group/disqus-dev/browse_thread/thread/e2213ce3882c855b/ea39c52f354c0572?lnk=gst&q=iframe#ea39c52f354c0572

    但 Disqus 现在有一个新主题 (Narcissus) 可以解决这个问题,它允许客户在不重新加载页面的情况下接收发布的评论。这解决了我的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-17
      • 1970-01-01
      • 1970-01-01
      • 2016-05-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多