PasteHTML
Jan 20, 2003I have an interesting situation where I need to pasteHTML "<script src=whatever.js></script>" using javascript. However, the "</script>" is being interpreted by the browser as ending the javascript before finsihing the job of pasting the HTML....
<SCRIPT language="JavaScript">
// Get a text range for the selection
var tr = parent.page.document.selection.createRange()
tr.pasteHTML("<script src=whatever.js></script>");
</script>