• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with ajax

#1
[eluser]Unknown[/eluser]
within my view ive got my inbox system and to delete a message ive got an image with class="delete"
calling the following code

Code:
$(document).ready(function(){
$('.delete').click(function(){
$.ajax({
type: "POST",
url: "/index.php/messages/delete",
    data: "id="+$(this).prev().text(),
         success: function(html){
    $('#msg_container').fadeOut('slow').load('/index.php/inbox').fadeIn("slow");}, 20000);
    }
      });
      return false
      });
      });
my controller is

Code:
function delete() {
  $name['delete_me']=$_POST['id'];
  $result = $this->user->deletepm($name);
  $this->output->set_output('works');

}

but nothing is working help?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.