2016-11-20 3 views
0

jquery-word-exportプラグイン(Marks Windollによって開発された)を使用して、私のWebページを.docドキュメントにエクスポートしています。 Google Chromeではすべてうまく動作しますが、Mozilla Firefoxではうまく動作しません。エクスポートボタンをクリックすると、次のエラーが表示されます。jQuery単語のエクスポートエラー

SyntaxError: export declarations may only appear at top level of a module

NS_ERROR_NOT_AVAILABLE

奇妙なことは、ウェブページをリフレッシュすることによって時々動作します。

これはどういう意味ですか、これをどのように解決できますか?

(おそらく別のエクスポートライブラリを使用して)別の解決策はありEDIT:

<div id="export-content"> 
<!-- PROFILE PICTURE --> 
<div id="divProfielfoto" ng-controller="profielfotoCtrl"> 
    <img id="profielfoto" ng-src="{{profielfoto}}" alt="profielfoto" style="width: 125px;height:125px;margin-bottom: 20px; border-radius:50%; border: 7px solid orange;" /></div> 
<input style="display: none;" id="profileUpload" type="file" accept="image/*"/> 
<!-- PROFILE PICTURE END --> 
</div> 
<button class="word-export" onclick="export()">Export as .doc</button> 

と、次のようにエクスポートするためのコードは次のとおりです:

$(".word-export").click(function (event) { 
    $("#export-content").wordExport("CV " + naam); 
}); 
+1

あなたのコードを共有します – brk

+0

は、firefoxではなくchromeで使用されているjsfiddle o plunrリンクを共有します。 –

+0

あなたはonclick属性を削除してみることができます。 – reza

答えて

0

私が発見した、次のように私のコードです回答。最初は、プロフィール画像へのパスは何もなかった。プロフィール画像をアップロードした後、有効な画像が表示されます。すべてが動作します。

関連する問題