How to trigger a change on button click

How to trigger a change on button click

I want to update a dropdownlist when another button is click by calling trigger but getting an error. Below is my code any help will be appreciated  

  1. $("#btnReplace").click(function () {
  2.  
  3. const oldPersonId = $('#OldbuttonId').val();
  4. const newPersonId = $('#newPersonID').val();
  5. var button = this;
  6. $.ajax({
  7. method: "POST",
  8. url: "@Url.Action("Replaced", "NewReplacement")",
  9. data: { OldId: oldPersonId, NewId: newPersonId},
  10. success: function (response) {
  11. $('#cdrl-load-text', button).html('Saved!');
  12. if (response != null && response.success) {
  13. alert(response.message);
  14. } else
  15. {
  16. alert(message);
  17. }
  18. debugger;
  19. $("#OldbuttonId").val().trigger('change');
  20. },

  21. error: function (xhr) {
  22. alert('Error: No Replaced happened.');
  23. }
  24. });

  25. });