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. `
<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();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.