Welcome Guest, Not a member yet? Register   Sign In
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?




Theme © iAndrew 2016 - Forum software by © MyBB