I’m having some trouble with a script confirmation. By standard it’s set to hide the contact form and display a confirmation message but it’s not working for all browsers. After some tests I realized it doesn’t work for most IE versions, which are around 40% of my visitors.
How do I replace the hide-and-show-msg to a “thankyou.html”? I’m guessing this works as most IEs fail to show the confirmation message although they manage to hide the form. The code in ‘header’ is currently:
<script src="php/js/jquery.validate.js"></script>
<script src="php/js/jquery.placeholder.js"></script>
<script src="php/js/jquery.form.js"></script>
<script>
$(function(){
$('#contact').validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
url: 'thankyou.php',
success: function() {
$('#contact').hide();
$('#contact-form').append("<p class='thanks'>Thank you! The message was sent.</center></p>")
}
});
}
});
});
</script>
Solved.
Reading http://groups.google.com/group/jquery-en/browse_thread/thread/58a9cbc1068d28c0/eb4bedb2cc36b126?pli=1
I added a conditional script
http://plungjan.name/test/testform_validation.html
What you need to do is to append to an element understood by IE.
If you do not want the conditional script, add a div to the end of the page and append to that instead like here: http://plungjan.name/test/testformvalidation.html
Other issue: I got
Seems the finally is not supported
When I Added
catch(e) {}before the finally – error gone