cant delete a record, total n00b here. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: cant delete a record, total n00b here. (/showthread.php?tid=26173) |
cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]rotarypot[/eluser] hola ! i am very very new to ajax/CI, so please be gentle i am trying to delete a record from my table and also have the nice animation to visually remove the record from the page,of course, i should make the actual record deletion work before moving on to the animation thingie, but im stuck and cant get it to delete records please help this makes the "delete" links Code: <?= anchor('#', 'borrar', array('class' =>'borrador', 'id'=>$res->img_id));?> this is my jQuery (in the view file) Code: $(document).ready(function() { this is my controller (simplified) Code: <?php cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]flaky[/eluser] use firebug for javascript debugging cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]rotarypot[/eluser] [quote author="flaky" date="1262919720"]use firebug for javascript debugging[/quote] right, firebug..:/ do you think its a javascript problem ?? cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]flaky[/eluser] I can't find a problem in the php code, I'm assuming it's a javascript bug cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]rotarypot[/eluser] ok, sorry to be thick here, but i dont know what im looking for in firebug, or where to look.. :-S cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]flaky[/eluser] look in the console (after turning on firebog) if there are any javascript error, the console will show them cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]WebsiteDuck[/eluser] Code: $.post("index.php/moderation/borrar", {item_id : del_id}, function(data){ This is posting to a relative address. Make sure you're not posting to yoursite.com/moderation/index.php/moderation/borrar cant delete a record, total n00b here. - El Forum - 01-07-2010 [eluser]rotarypot[/eluser] yeah!!!! that was it... thanks |