2016-08-21 9 views
0

私は(Google以外の)ウェブサイトにグループを埋め込み、空白のページを取得しています。ウェブサイトにGoogleグループを埋め込む

「あなたのグループを管理する」というコードを追加しました。これは以下のとおりです。

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

ノー成功を収めて& parenturlを削除しようとしています。

また、コードを単純なhtmlドキュメントに保存しようとしましたが、それでも空白のページが表示されます。

ここでは、単一のページのコードが間違っている何が起こっている上の任意のアイデアは...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title></title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
</head> 
<body> 
<p>Testing</p> 
<iframe id="forum_embed" 
    src="javascript:void(0)" 
    scrolling="no" 
    frameborder="0" 
    width="900" 
    height="700"> 
</iframe> 
<script type="text/javascript"> 
    document.getElementById('forum_embed').src = 
'https://groups.google.com/forum/embed/?place=forum/the-sophia-club' 
+ '&showsearch=true&showpopout=true&showtabs=false' 
+ '&parenturl=' + encodeURIComponent(window.location.href); 
</script> 

</body> 
</html> 

です?

答えて

1

問題は、ドキュメントがhtmlではなくxhtmlであることです。 2つの標準は異なっており、Googleではxhtmlが好きではないようです。

xhtmlは残念ながら死んでいるようですので、html5に変更してみてください。唯一必要な変更は、doctype宣言にある必要があります。

また、ローカルディレクトリを指しているWebブラウザを使用してページを開いたときに埋め込みが機能しませんでした。しかし、私はWebサーバーにページをアップロードしたときに動作しました。

関連する問題