Pulling my hair out trying to make sense of this stuff.
Situation:
1. User clicks rating button (Rate function)
2. Calls Rate.php via ajax - updates #CountContainer with TotalCount (number of times the photo has been rated).
3. What I want to do now is... if TotalCount = 100, execute ImageStatus function (another ajax-driven function)
function Rate(PhotoID) {
$.ajax({
url: 'rate.php',
data: 'photoID='+photoID,
success: function(data) {
$("#CountContainer").html(data);
}
});
}
function ImageStatus(PhotoID) {
$.ajax({
url: 'imgStatus.php',
data: 'photoID='+photoID,
success: function(data) {
$("#StatusContainer").html(data);
}
});
As always, I appreciate you programming wizards!