SyntaxFix
Write A Post
Hire A Developer
Questions
Here's how to do it in Prototype: $(id).update(data)
$(id).update(data)
And jQuery: $('#id').replaceWith(data)
$('#id').replaceWith(data)
But document.getElementById(id).innerHTML=data should work too.
document.getElementById(id).innerHTML=data
EDIT: Prototype and jQuery automatically evaluate scripts for you.