HI Everyone,



I am trying to write an Achievments Widget for Blogger that lists the 5 most recent achievments. I have come up with the code below. It works perfectly as a stand alone web page, but does not work as a HTML/Java Widget. Any advice would be greatly appreciated.




Code:
<script type="text/javascript">
var xmlDoc;
if (window.ActiveXObject)
{// code for IE
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Mozilla, Firefox, Opera, etc.
    xmlDoc=document.implementation.createDocument("","",null);
}
else
{
    alert('Your browser cannot handle this script');
}if (xmlDoc!==null) 
{
    xmlDoc.async=false;
    xmlDoc.load("http://www.wowarmory.com/character-achievements.xml?r=Nagrand&cn=Razorbaxftw"); 
for (i=0;i<xmlDoc.getElementsByTagName('achievement').length;i++)
    {
        x=xmlDoc.getElementsByTagName("achievement")[i].attributes;
        y="http://www.wowhead.com/?achievement=";
        document.write("" + x.getNamedItem("title").nodeValue + "
");
    }
}
</script>


The Error in FF is Message:

"Unterminated string constant
Line: 726
Char: 59
Code: 0
URI: http://tdntesting.blogspot.com/"

and it is refering to:

Code:
document.write("" + x.getNamedItem("title").nodeValue + "
");