دنبال کننده ها

۱۳۹۶ مهر ۱۰, دوشنبه

javascript - Capture POST request to local variable in script

[ad_1]


var sku = ""; //to be passed to server when filled

var cookie_info =
number_nights: number_nights_cookie,
number_travelers: number_travelers_cookie,
type_traveler: type_traveler_cookie,
departure_date: departure_date_cookie,
country: country_cookie
;

$.ajax(
type: 'POST',
url: 'https://azooree.com/wp-admin/php/sku-calculation.php',
data: cookie_info,
success: function(response)
console.log('success', response);
sku = response;
,
error: function()
console.log('error!');
alert("[ERROR] Information lost, please try again. Thank you!");

);

var basic =
info: sku + "LP"
;



[ad_2]

لینک منبع