Hi
This is the code I have to make my subscribe pop-up close without going to a thankyou page. It doesn’t work, but I feel like it should. Do you know why it doesn’t work and if so can you let me know, please?
URL is [url]www.chaserbrand.com
Thanks!
phil
<div id=”js-pop”>
<div class=”newsletter-form”>
<form id=”js-form” form name=”catwebformform12809″ method=”post” onsubmit=”return checkWholeForm12809(this)” enctype=”multipart/form-data” action=”/FormProcessv2.aspx?WebFormID=63459&OID={module_oid}&OTYPE={module_otype}&EID={module_eid}&CID={module_cid}”>
</p>
<table class=”webform” cellspacing=”0″ cellpadding=”2″ border=”0″>
<tbody>
<tr>
<td><label for=”FirstName”> <span class=”req”></span></label><br />
<input type=”text” name=”FirstName” id=”FirstName” value=”no” style=”display:none” class=”cat_textbox” maxlength=”50″ /> </td>
</tr>
<tr>
<td><label for=”LastName”> <span class=”req”></span></label><br />
<input type=”text” name=”LastName” id=”LastName”value=”no” style=”display:none” class=”cat_textbox” maxlength=”50″ /> </td>
</tr>
<tr>
<td><label for=”EmailAddress”>Email Address <span class=”req”></span></label><br />
<input type=”text” name=”EmailAddress” id=”EmailAddress” class=”cat_textbox” maxlength=”50″ /> </td>
</tr>
<tr>
<td><input class=”cat_button” type=”submit” value=”Submit” onclick=”self.close()” id=”catwebformbutton” /></td>
</tr>
<tr>
<td><input name=”CampaignList_55238″ type=”checkbox” style=”display:none” value=”default” checked=”checked” /></td>
</tr>
</tbody>
</table>
<script type=”text/javascript” src=”/CatalystScripts/ValidationFunctions.js”></script>
<script type=”text/javascript”>
//<![CDATA[
var submitcount12809 = 0;
function checkWholeForm12809(theForm) {
var why = “”;
if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, “First Name”);
if (theForm.LastName) why += isEmpty(theForm.LastName.value, “Last Name”);
if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value);
if (why != “”) {
alert(why);
return false;
}
if (submitcount12809 == 0) {
submitcount12809++;
finishCTA(“chaser-popPerm”);
var cForm = $(“#js-form”);
var data = cForm.serialize();
$(“#js-pop”).dialog(“close”);
$.post(cForm.attr(“action”), data, function (data, t, jqxhr) {
});
$(“#js-pop”).dialog(“close”);
//theForm.submit();
return false;
} else {
alert(“Form submission is in progress.”);
return false;
}
}
//]]>
</script>
</form>
//theForm.submit();
return false;
} else {
alert(“Form submission is in progress.”);
return false;
}
}
//]]>
</script>
</div>