1
我使用的fancybox提交併submiting我的表格後,我想redirtect我父頁面的一些指定的網址我使用的fancybox如下重定向父頁面裏面的fancybox
$(document).ready(function() {
$('[id*=addnewRequest]').fancybox({
'width': 760,
'height': 540,
'padding': 0,
'margin': 0,
'hideOnOverlayClick': false,
'scrolling': 'auto',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'centerOnScroll': true,
'onClosed': function() {
if ($.redirTo != null && $.redirTo.length > 0){
window.location.replace($.redirTo);
}
else {
parent.location.reload(true);
}
}
});
});
和submiting後指定的URL我形成我使用下面的寄存器腳本,「redirectTo」是URL,我想我的父頁面會重定向
ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "add", "parent.jQuery.redirTo='" + redirectTo + "'; parent.jQuery.fancybox.close();", true);
現在我的父頁面將如何重定向到perticular url.Any想法?
感謝,
非常感謝。它的作品... –
@GurbaxSinghBhangal不客氣,歡迎新年快樂。 – Aristos
也祝你新年快樂。 –