Ajax Contact Form submit bug |
[eluser]guynamedkeith[/eluser]
Hello, I am in major need of some help. I am not very good with javascript and completely stuck on the below issue. Goal: A codeigniter contact form sent through ajax that is validated using codeigniters validation and returns the proper view on failure or success, replacing DIV#contact-form with the new view. Problem: My form submits fine through ajax, validates with codeigniter, and replaces DIV#content with the new form that has validation errors. If you now click submit again on the form currently filled with errors the form submits through http and does a full page refresh. Notes: I am using codeigniter 1.7.2 and mootools 1.2 with mootools more. Live example: http://keithloy.me/index.php/contact/index Source: My dropbox All relevant code is posted below: mootools form send Code:
[eluser]guynamedkeith[/eluser]
codeigniter controller Code: codeigniter view Code:
[eluser]guynamedkeith[/eluser]
I believe the issue is due to me replacing the entire form. Is there any other solution besides clearing the form instead of the div containing the form and placing content inside of the form? |
Welcome Guest, Not a member yet? Register Sign In |