Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.71 KB | None | 0 0
  1. function CheckDuplicationFriends(){
  2.   var email_list = [];
  3.   jQuery('#save_recipient').click(function(){
  4.     jQuery('input[id*="email"]').each(function(index, el){
  5.       email_list[index] = jQuery(el).val();
  6.       console.log(email_list);
  7.      });
  8.     jQuery.ajax({
  9.       type:'POST',
  10.       url: '/shop/ticket/friends/confirm/',
  11.       dataType: 'json',
  12.       data: {
  13.         'ticketproductid': jQuery('#productid').val(),
  14.         'email_list': email_list
  15.        
  16.       },
  17.       success: function(data){
  18.         jQuery('#quantity_product_form').submit()
  19.       }
  20.       errors: function(data){
  21.         jQuery('#quantity_error').text(data.error_list.toString())
  22.       }
  23.     })
  24.    
  25.   });
  26.   // return false;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement