Depending on the change in URL parameter my values in the html changes. So basically i am passing these values to a json file. Since the page is refreshing because of the post my values are getting erased.I tried event prevent default, but its not working for me.
var carryOver ={"Jan":"","Feb":""};
var parameters = getParameterByName('month')//gets the current URL parameter
if(parameters == '01-2017'){
$('#monthQuota').html(janQuota);
carryOver["Jan"] = 300;
}
else if(parameters == '02-2017'){
carryOver["Feb"] = 400;
}
$(function() {
$('parameters').on('change', function (e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "utilization-2017-test.php",
data: {
json: JSON.stringify(monthBalances)
}
})
})
})