function setRatingVote(typeId, objectId, table, tableId, vote, url, div, divRating, msgSending, msgSend, msgSendAgain) { $('#' + div).html(msgSending); $.getJSON(url + '&typeId=' + typeId + '&objectId=' + objectId + '&vote=' + vote + '&table=' + table + '&tableId=' + tableId, function(j){ if (j[1].rateAgain) { // již hlasoval $('#' + div).html(msgSendAgain); } else { // hlas byl odeslán $('#' + div).html(msgSend); } if (j[0].actualRating > 0) { $('#' + divRating).html(j[0].actualRating); } } ); }