update variable after success of ajax function
- by Scarface
Hey guys quick question, I am sending a request with the jquery ajax function with a variable. After the request I want that variable updated to match the value of the sent back information, so next time the ajax function executes, it send the value of the new variable.
$.ajax({
type: "POST",
data: "countusers=" + countusers,
url: "tester.php",
dataType: 'json',
success: function(json)
{
var countusers=json.rownumber;
}
}
})