ユーザーがボタン (時刻表の印刷) を押すと、時刻表を示すページがポップアップ ウィンドウに表示され、印刷オプションが自動的に表示される機能を作成しています。ただし、ポップアップがまだタイムテーブルをロードしているときに、アニメーション GIF を表示したいと考えています。ポップアップの時刻表は AJAX でフェッチされないため、ajax の開始と停止を使用できません。
<input type="button" value="Print Timetable" class="printButton" onclick="window.open(url, ' _parent','height=550, width=800');"/>
これは、タイムテーブルのポップアップでこれまでに起こっていることです:
<div id="animated-logo" class="animated-logo">
<a href="/" title="Print your timetable">Test</a>
</div>
<script type="text/javascript">
$('.animated-logo').addClass('logo');
$('.animated-logo').removeClass('animated-logo');
if (window.print){ self.print();}
</script>
明らかに、そのアニメーション GIF は機能しませんが、それは始まりです。
どんな助けでも素晴らしいでしょう。ありがとう!