阅读背景:

如何使用带有codeigniter的jquery ajax方法(post)正确提交表单

来源:互联网 

I've build a small CMS in Codeigniter for a website with a couple of forms. The forms are all submitted with the ajax method in jQuery and passed to the controller. All works fine but I figured it out that I always get a success, no matter if the data is saved in the database or not. The method only checks if the data is passed to the controller properly, i guess. On success there is a message for the user (Saved), this will fire everytime, no matter what happens behind the scenes. How I can force success (or done, or some other callback) to get the "Saved" message only if the data is saved?I've build a small CMS in Codeigniter for a web




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: