Advertisement
Guest User

js-ajax-call

a guest
Oct 25th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(".js_agg_qr_form").on('submit',addQr);
  2. function addQr(e) {
  3.     e.preventDefault();
  4.     var $form = $(e.currentTarget);
  5.     $.ajax({
  6.         url: url_add_qr,
  7.         method: 'POST',
  8.         data: $form.serialize(),
  9.         success: function (data){
  10.             console.log("fatto");
  11.             $('#exampleModal').modal('toggle');
  12.         }
  13.     })
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement