I cant update a div after keypress using ajax

I cant update a div after keypress using ajax

hello, I have a problem when I am trying to update a div  after to save a record in my DB, what I am doing is to save a record and then to print in another div.

here is my code:

  1. $('input.txtcomentario').keypress(function(e) {
  2.         if (e.keyCode === 13) {
  3.             var idp = $(this).closest('.dvpublicacion').find('input.hdidpub').attr('value');
  4.             var comentario = $(this).attr('value');
  5.             $(this).val('');
  6.             if (comentario.length > 0) {
  7.                 $.ajax({
  8.                     type: 'POST',
  9.                     url: "interaction/savecomment.php",
  10.                     data: 'idp=' + idp +
  11.                             '&comentario=' + comentario,
  12.                     success: function(data) {
  13.                         $.ajax({
  14.                             type: 'GET',
  15.                             url: "interaction/listcomments.php' ?>",
  16.                             data: 'idp=' + idp,
  17.                             success: function(data1) {
  18.                                 $(this).closest('.dvpublicacion').find('.dvcomentariospub').html(data1);//This does not work
  19.                             }
  20.                         });
  21.                     }
  22.                 });
  23.             }
  24.         }
  25.     });
But something strange occurs, when I print anything on the div outside of the second ajax, it works.

  1. $('input.txtcomentario').keypress(function(e) {
  2.         if (e.keyCode === 13) {
  3.             var idp = $(this).closest('.dvpublicacion').find('input.hdidpub').attr('value');
  4.             var comentario = $(this).attr('value');
  5.             $(this).val('');
  6.             if (comentario.length > 0) {
  7.                 $.ajax({
  8.                     type: 'POST',
  9.                     url: "interaction/savecomment.php",
  10.                     data: 'idp=' + idp +
  11.                             '&comentario=' + comentario,
  12.                     success: function(data) {
  13.                         $.ajax({
  14.                             type: 'GET',
  15.                             url: "interaction/listcomments.php' ?>",
  16.                             data: 'idp=' + idp,
  17.                             success: function(data1) {
  18.                            
  19.                             }
  20.                         });
  21.                         $(this).closest('.dvpublicacion').find('.dvcomentariospub').html('anything');// This works
  22.                     }
  23.                 });
  24.             }
  25.         }
  26.     });

I can find the mistake, please help me.