I’m using an email script that gives me a success statement in a div (#errorEmail).
Instead I would like to execute “inv_fc_mail_success.php” upon success.
How would I replace this line: success: function(){$(‘#errorEmail’).html(‘Email Sent’);
if (validateEmail(email)&& email!=""){
$.ajax({
url: "inv_fc_mail.php?email="+email,
success: function(){
$('#errorEmail').html('Email Sent');
setTimeout(function(){$("#FCemail").dialog('close', function()
{$('#errorEmail').hide();});}, 3000);
}
});
}
else {$('#errorEmail').html('Email Not Valid').show();}
To redirect your browser to your success page:
Note that the
window.reference is unnecessary in most up to date browsers, but it’s good pratice to keep it compatible with older ones as well.Reference
Or more specifically: