Can't delete record via AJAX - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Can't delete record via AJAX (/showthread.php?tid=60700) |
Can't delete record via AJAX - El Forum - 06-06-2014 [eluser]mohssenvox[/eluser] hi , sorry i'm not good in EN , but i can explain what i want.. i want to delete record using ajax here my view code: Code: [removed] and here is my controller code: Code: public function delMessage() { My model: Code: public function deleteMessage($data) { i try to execute this code , but i cant , any idea..? Can't delete record via AJAX - El Forum - 06-06-2014 [eluser]InsiteFX[/eluser] Depending on the browser you are using hit F12 for the developer tools and see what your ajax is doing. You may need to add index.php to your base_url Can't delete record via AJAX - El Forum - 06-06-2014 [eluser]mohssenvox[/eluser] tnx for reply. i use .htaccess file to remove index.php , i use it in url but i still have problem. i dont get any error , but this code dont delete row in my database only remove table from HTML Can't delete record via AJAX - El Forum - 06-07-2014 [eluser]InsiteFX[/eluser] In your ajax code the url should be lowercase not uppercase for one jQuery is case sensitive. If you need index.php just change base_url to site_url Code: $.ajax({ I do this in jQuery. Code: /* same as site_url() in CodeIgniter php Good videos to watch: Web Lee Can't delete record via AJAX - El Forum - 06-07-2014 [eluser]mohssenvox[/eluser] Tnx So Much...(Y) , it work find.. wish the best for you! |