AJAX call of function containing javascript which is not loaded (Plugin development)

So, the success function in the ajax function has to look like the following:

success: function(html){
          console.log('success');
          $( '#results' ).html(html);
          $( '#results .usermanagement_select' ).select2({tags: true});
        }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)