我遇到了一些问题。在 fancybox 窗口中更改密码后,我正确打开了“错误密码”Iframe(如果用户输入错误密码)。问题来了:关闭“错误密码”Iframe 后,我想重新打开“密码更改”Iframe。在检查密码有效性后的“错误密码”iframe上,我使用:
<link rel="stylesheet" href="/includes/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/includes/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript">
parent.$.fancybox.open([
{
href: '/pages/messages/wrong_password.asp'
},
], {
maxWidth: 350,
maxHeight: 65,
fitToView: false,
width: 350,
height: 65,
padding: 0,
scrolling: 'auto',
preload: true,
type: 'iframe',
closeBtn: false,
openEffect: 'elastic',
closeEffect: 'fade',
helpers: {
overlay: {
css: {
'background': 'rgba(255,255,255, 0.80)'
}
}
},
afterClose: function () {
$('.pass').fancybox.open;
}
});
</script>
我的fancybox初始化是:
$(document).ready(function () {
$('.fancybox').fancybox({
openEffect: 'elastic',
fitToView: true,
closeEffect: 'fade',
padding: 5,
helpers: {
overlay: {
css: {
'background': 'rgba(227,227,227, 0.90)'
}
}
}
});
$('.pass').fancybox({
maxWidth: 560,
maxHeight: 300,
fitToView: false,
type: 'iframe',
width: 560,
padding: 0,
height: 300,
autoSize: true,
autoResize: true,
autoScale: true,
closeClick: false,
closeBtn: false,
openEffect: 'fade',
openSpeed: 'fast',
closeEffect: 'fade',
closeSpeed: 'fast',
scrolling: 'auto',
helpers: {
overlay: {
css: {
'background': 'rgba(227,227,227, 0.90)'
}
}
}
});
});
最初通过链接打开“更改密码”的类中的 .pass 类,但我无法再次传递 href 页面。
预先感谢您的任何帮助。