Sep 21st, 2009, 4:44 PM
This is a tough one and I think I have a work around, but before I code I wanted to bounce this off of people smarter than me.
I want to use the jquery form plugin to submit my form via ajax (http://www.advanced4x4vans.com/form.htm). The truth is, it all works beautifully, except that the form plugin is set up to fire a success callback function. Because formtools redirects users, it sends the form plugin a "302 temporarily moved" response instead of a "200 success". So, the success callback never fires. The response I need is just a short bit of code that says "congrats your form was submitted." So, I might modify the process.php file to check the redirect_url form input for some secret keyword and echo the response. Then I'll get the "200 success" I need, but it seems like a bit of a hack.
If there isn't a way to accomplish what I want, it might be a worthwhile addition to the admin section. A simple checkbox (to acknowledge you just want to output a manually coded response) and a text area containing the response. The text area could contain html, xml, or json data input by the user.
Long post. Sorry. I look forward to any ideas.
I want to use the jquery form plugin to submit my form via ajax (http://www.advanced4x4vans.com/form.htm). The truth is, it all works beautifully, except that the form plugin is set up to fire a success callback function. Because formtools redirects users, it sends the form plugin a "302 temporarily moved" response instead of a "200 success". So, the success callback never fires. The response I need is just a short bit of code that says "congrats your form was submitted." So, I might modify the process.php file to check the redirect_url form input for some secret keyword and echo the response. Then I'll get the "200 success" I need, but it seems like a bit of a hack.
If there isn't a way to accomplish what I want, it might be a worthwhile addition to the admin section. A simple checkbox (to acknowledge you just want to output a manually coded response) and a text area containing the response. The text area could contain html, xml, or json data input by the user.
Long post. Sorry. I look forward to any ideas.
