Hi Lee,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;In cases like this, I always ask "what part doesn't work?" since the point of failure will usually help you (or us) to isolate the difference between the browsers.&nbsp; Can you get a bit more data on which line it is at which things go wrong?&nbsp; An error message would be one way to identify this point; another would be a debugger (you can download the IE Script Debugger from MS though it doesn't always help), and a third would be the old-fashioned brute-force method of using alert, window.status, or document.write to show what data you have so far.<br><br>Cheers,<br><br>Peter<br><br><font face="Tahoma, Arial, Sans-Serif" size=2>
<hr align=center width="100%" SIZE=2>
<b>From</b>: "Lee Bettridge" &lt;lbettridge@twowaytv.co.uk&gt;<br><b>Sent</b>: Friday, July 20, 2007 2:59 AM<br><b>To</b>: "[JavaScript List]" &lt;javascript@LaTech.edu&gt;<br><b>Subject</b>: [Javascript] dom/javascript question regarding Internet Explorer</font><br><br><br>I want to copy the contents of the tag in an html<br>document and write this elsewhere in the doc when it loads.<br>The following works in Firefox but not in ie, could anyone point out why<br>and maybe suggest an alternative please.<br><br><br>HTML<br><br>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br><br><br><br><br><link href="style.css" type=text/css rel=stylesheet><br><br><br><br>
<div class=document_header id=document_header></div><br><br><br><br><br><br>JAVASCRIPT<br><br>var title = document.getElementsByTagName("TITLE").item(0);<br>var str_title = title.firstChild.data;<br><br>var obj = document.getElementById("document_header");<br>while(obj.hasChildNodes()) obj.removeChild(obj.childNodes[0]);<br>obj.appendChild(document.createTextNode(str_title));<br>________________________________________________________<br>Two Way TV is the trading name of Two Way Media Ltd<br>Company Number: 4904168<br>_______________________________________________<br>Javascript mailing list<br>Javascript@LaTech.edu<br>https://lists.LaTech.edu/mailman/listinfo/javascript<br><br>