I need help to close a SimpleModal popup when clicking a button 'submit'. The page where this button is is an iframe within the popup SimpleModal. the code of the page below.
<form action="#" method="post" id="mc-form">
<div id="mc">
<p>Por favor desenha a forma no quadro abaixo ou gere uma nova forma: (<a onclick="window.location.reload()" href="#" title="Clique para Gerar um novo Captcha">Gerar</a>)</p>
<canvas id="mc-canvas">
Your browser doesnt support the canvas element - please visit in a modern browser.
</canvas>
<input type="hidden" id="mc-action" value="posclick.php"/>
</div>
<p><input disabled="disabled" autocomplete="false" type="submit" value="Seguir"></p>
</form>
A simple way is to just remove the form from the dom when the form is submitted
$("#mc-form").submit(function() {
$(this).remove();
});