如何在iframe中运行disqus?

时间:2021-11-18 01:15:52

I'm trying to add disqus comments per-marker on a google map. To make it per-marker, I've added an iframe to the infowindow, with a different URL for each marker. It works, and I can post comments, but the infowindow isn't updated after a successful post; the spinner remains. Firebug says:

我正在尝试在谷歌地图上添加每个标记的disqus评论。为了使它成为每个标记,我已经向infowindow添加了一个iframe,每个标记都有一个不同的URL。它有效,我可以发表评论,但成功发布后信息不会更新;旋转器仍然存在。萤火虫说:

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

The HTML code looks like this:

HTML代码如下所示:

My GMapEZ Maps

我的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>

The comments page looks like:

评论页面如下:

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

1 个解决方案

#1


According to this thread the problem is the refreshing of the iframe. http://groups.google.com/group/disqus-dev/browse_thread/thread/e2213ce3882c855b/ea39c52f354c0572?lnk=gst&q=iframe#ea39c52f354c0572

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

But Disqus has now a new theme (Narcissus) that resolve this problem, which allows for the client to receive the posted comment without reloading the page. This resolved the problem for me.

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

#1


According to this thread the problem is the refreshing of the iframe. http://groups.google.com/group/disqus-dev/browse_thread/thread/e2213ce3882c855b/ea39c52f354c0572?lnk=gst&q=iframe#ea39c52f354c0572

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

But Disqus has now a new theme (Narcissus) that resolve this problem, which allows for the client to receive the posted comment without reloading the page. This resolved the problem for me.

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