I want to create an AJAX poll to rate comments. In each comment you can either thumbs up, or thumbs down by clicking on an image. I achieved that part. However, I don't know how to update the score with AJAX in the correct span.
document.getElementById ("response").innerHTML =xmlHttp.responseText;
That shows the result in <span id="response">new score</span>
I want the new score to be updated next to the thumbs up or thumbs down image, in the comment that was rated.
I generate the span tags like this:
<span id="response<?php echo $comment_id; ?>">I want the new score here</span>