[英]Close Fancybox popup after successful form submition
I have created a fancy popup for small form and i want the popup should be removed after submission of form. 我已经为小型表单创建了一个精美的弹出窗口,并且希望在提交表单后删除该弹出窗口。 Please help me with the correct solution. 请帮助我提供正确的解决方案。
<form id="form" method="post" name="legal_cust" action="javascript:formSubmit();">
// all stuff here with html form
</form>
and i am calling the javascript function after this i want to close fancybox from javascript function. 而且我要在此之后调用javascript函数,我想从javascript函数关闭fancybox。 ` `
<script>
if(!check_cookie)
{
beginNewsletterForm();
<?php Mage::getModel('core/cookie')->set('popup-shown', 'true', 5);?>
}
});
function beginNewsletterForm ()
{
jQuery.fancybox({
'width': '600',
'modal':'true',
'height': '600',
'padding': '0px',
'autoDimensions': false,
'autoScale': true,
'autoSize': false,
'transitionIn': 'fade',
'transitionOut': 'fade',
'showCloseButton': true,
'type': 'inline'
});
jQuery("#bdate-popup").trigger('click');
}
</script>
` `
i want to write something which will remove fancy popup 我想写一些东西可以消除花哨的弹出窗口
<script>
function formSubmit()
{
//something to remove popup
}
</script>
你应该试试
$.fancybox.close();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.