Search code examples
iframegoogle-groups

iframes appearing blank in both Firefox and Google Chrome


I'm trying to implement a Google Group into my website but appearing blank. I know my browser is supported because I can view other embedded Google Groups.

<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
width="900"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById('forum_embed').src =
 'https://groups.google.com/forum/embed/?place=forum/artemis-moonlight'
 + '&showsearch=true&showpopout=true&showtabs=false'
 + '&parenturl=' + encodeURIComponent(window.location.href);
</script> 

This is the code I'm using, straight from the Google Groups site, but no matter the web browser, all I get is... http://puu.sh/lq4ZZ/85db1278b5.png


Solution

  • Here is a jsFiddle using your exact code and it is working so I am unsure what could be happening.

    perhaps you may need to look into some .htaccess issues or other server restrictions that may be in place on your hosting

    html

       <iframe id="forum_embed"
        src="javascript:void(0)" scrolling="no" width="900" height="700">
        </iframe>
    

    js

        document.getElementById('forum_embed').src =
     'https://groups.google.com/forum/embed/?place=forum/artemis-moonlight'
     + '&showsearch=true&showpopout=true&showtabs=false'
     + '&parenturl=' + encodeURIComponent(window.location.href);  
    

    https://jsfiddle.net/happymacarts/6sh1edmf/