Skip to content

Instantly share code, notes, and snippets.

@KensoDev
Created February 28, 2010 09:20
Show Gist options
  • Save KensoDev/317503 to your computer and use it in GitHub Desktop.
Save KensoDev/317503 to your computer and use it in GitHub Desktop.
function loadAuctionOffers(saleID) {
$.getJSON("/HttpHandlers/AuctionOffersHandler.ashx?saleID=" + saleID + "&cacheKiller=" + Math.random(), function(json) {
var offers = $(".auction_offers_table").find("tr.row").length;
if (offers < json.length) {
playAlertSound();
$(".auction_offers_table").find("tr.row").remove();
for (var i = 0; i < json.length; i++) {
var auctionID = json[i].saleID;
var city = json[i].city;
if (city == null)
city = "";
if (json[i].position == "1") {
$(".auction_offers_table").append('<tr class="row winners_row"><td>' + json[i].userID + '</td><td>' + json[i].initials + '</td><td>' + city + '</td><td>' + json[i].bidAmount + '</td><td>' + json[i].position + '</td></tr>')
} else {
$(".auction_offers_table").append('<tr class="row"><td>' + json[i].userID + '</td><td>' + json[i].initials + '</td><td>' + city + '</td><td>' + json[i].bidAmount + '</td><td>' + json[i].position + '</td></tr>')
}
}
}
});
setTimeout('loadAuctionOffers("' + saleID + '")', 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment