Twiebie |
|
||
---|---|---|---|
I'm wondering what in Cotonti the best way is to handle errors with an Ajax submitted form to a PHP file. Normally with a simple form the errors can be handled with Cotonti's cot_error(); function like this:
How would you guys handle something like this if the form is submitted with Ajax? |
Trustmaster |
|
||
---|---|---|---|
Here is an example trick that I use:
May the Source be with you!
|
Twiebie |
|
---|---|
Thanks, Trustmaster! Looks like I sort of was on the right track with my JSON response effort. I'm guessing you are using this with success: function() {}, as you return 200 regardless? |
Trustmaster |
|
---|---|
Yes, I check the status and error messages in success function. May the Source be with you!
|
Twiebie |
|
---|---|
OK, got it. Thanks! |