ajax-
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("lblvoteup").innerHTML=xmlhttp.responseText;
//document.getElementById("lblvotedown").innerHTML=xmlhttp.responseText;
}
}
html-
<tr>
<td ><img src="images/up.jpeg" style="border:none;" title="Like"
onclick="doVote('<?php echo $q_id; ?>','<?php echo $_SESSION['UserId']; ?>','up', '<?php echo $q_up; ?>')"></td>
<td ><label id="lblvoteup"><?php echo $q_up;?></label></td>
<td style="border-left:1px solid whitesmoke;"><img src="images/down.jpeg" style="border:none;" title="Dislike"
onclick="doVote('<?php echo $q_id; ?>','<?php echo $_SESSION['UserId']; ?>','down', '<?php echo $q_down; ?>')"></td>
<td ><label id="lblvotedown"><?php echo $q_down; ?></label></td>
</tr>
problem is I dont want to write another ajax function to update lblvotedown
.How can i check that which image is clicked in ajax function?