Thanks for your code and your comment that it only works for Internet Explorer.
I inserted your code into the raw-html editor and clicked the 'update' button. Then I opened (without saving the blog-post) the raw-html again to find out that the span-tag was gone. After changing the span-tags a little bit the changes weren't removed anymore.
I made this change from: <span
<span id="testarea"> </span>
I also changed the line with 'xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");' to
xmlhttp = new XMLHttpRequest();
Unfortunately, I don't get a value back, so there is still something to investigate. I know that the final code will have to check for the browser is used at the client. Just need to get a value back first...
Thanks for your help so far!