1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| function Voter(id, vote_url, verif_css, caller)
{
var url = "";
var compte = document.getElementById('txtCompte');
var imv = document.getElementById('txtImV');
var m_url = "voter.php?voteID=" + id + "&voteVerif=d75fea&c=temp&css=" + verif_css;
new Request.HTML(
{
url: (m_url),
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript)
{
if(responseHTML == "OK_POINT")
{
$(caller).set('html', "<span style='color:green; font-size:1.1em;'>Vous avez reçu 1 point</span>");
caller.set('href', '#');
caller.set('onClick', '');
caller.set('target', '');
}
else if(responseHTML == "OK_VOTE")
{
$(caller).set('html', "<span style='color:lightgreen; font-size:1.1em;'>Vous avez reçu 1 vote</span>");
caller.set('href', '#');
caller.set('onClick', '');
caller.set('target', '');
}
else
{
$(caller).set('html', "<span style='color:red; font-size:1.1em;'>Une erreur s'est produite : " + responseHTML + "</span>");
caller.set('href', '#');
caller.set('onClick', '');
caller.set('target', '');
}
}
}).send();
} |
Partager