try change code editdoc.body.innerHTML=""; to editdoc.body.innerHTML=" "; it will fix the firefox and IE issue.
Regards,
ken