Leandro Vieira Pinho の Lightbox v 0.5 コードを使用。ライトボックスを閉じるために使用されるクリック イベントを設定するセクションがあります。このコードは、Chrome と Firefox でうまく機能します。しかし、IE で使用すると、ボタンはまったく機能しません。関連するコードはこちらを参照してください。
<script type="text/javascript">
//****MISC UNRELATED CODE****//
// Assigning click events in elements to close overlay
$('#jquery-overlayFinancial,#jquery-lightboxFinancial').click(function () {
_finish();
});
function _finish() {
$('#jquery-lightboxFinancial').remove();
$('#jquery-overlayFinancial').fadeOut(function () { $('#jquery-overlayFinancial').remove(); });
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility': 'visible' });
}
function closelightboxFinancial() {
$('#jquery-overlayFinancial').click();
}
//****MISC UNRELATED CODE****//
</script>
別のページの閉じるボタンのコード:
<script type="text/javascript">
function CloseMyPlan() {
try {
parent.closelightboxFinancial();
}
catch (err) {
txt = "There was an error on this page.\n\n";
txt += "Error description: " + err.description + "\n\n";
txt += "Click OK to continue.\n\n";
}
}
</script>
フォーム コントロール ページの Close Button IMG タグ:
<img alt="Close" style="cursor: pointer" src="<%=_imageServerPath%>images/close_btn.jpg"
onclick="javascript:CloseMyPlan();" />