Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reference self in ajax callback

$.ajax({
    context: this,
    type: 'post',
    url: '<?php echo site_url('user/accept_deny_friendship_request')?>',
    data: 'action='+$action+'&user_id='+$user_id,
    success: function(response){
       //can access this now!
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reference #ajax #callback
ADD COMMENT
Topic
Name
7+4 =