I have a problem. I'm sending a ajax request and I get the data to load the right results depending on the link that's click. When I click a different link and request the results to reflect that link. It retains the value from the previous link. Any help would greatly be appreciated. Here's what I'm doing. Here's my ajax call
$('body').on('click', 'button', function () {
$.ajax({
url: fullUrl,
type: "GET",
dataType: "json",
ifModified: true,
success: onDataReceived,
error: onError//,
// data: data
});
});
Now when I click the button I get the right values the first time, but when I click a different link to change one of the values the result doesn't change. Like it's caching the results. I've tried setting cache to false, clearing browser cache to now avail. What am I doing wrong
My success function is this
function onDataReceived(series) {
// Push the new data onto our existing data array
count = 0;
for (var prop in series) {
if (series.hasOwnProperty(prop))
++count;
}
for (i = 0; i < count; i++) {
if (!alreadyFetched[series[i].label]) {
data.push(series[i]);
}
}
$.plot("#placeholder", data, options);
}