quartzy
05-08-2009, 05:35 PM
I need to call an external script, to where I want it in the body of the XHTML. I have tried this
<code>
<div class="bar">
<h2 class="digitalclock"><span>About Us</span>
<script type="text/javascript">
/* <![CDATA[ */
document.write('<script src="', js/date.js, '" type="text/JavaScript"><\/script>');
/* ]]> */
</script>
</h2><noscript><p>Scripts disabled - Date and Time clock</p></noscript></div>
</code>
but it does not work, so wondered if there was an event handler I could use. The problem I have is that it is a date script that I only want on the bar so if I link to the script in the head, I still need to call it somehow. Can anyone help, I am new to all this javascript an EH and DOM
<code>
<div class="bar">
<h2 class="digitalclock"><span>About Us</span>
<script type="text/javascript">
/* <![CDATA[ */
document.write('<script src="', js/date.js, '" type="text/JavaScript"><\/script>');
/* ]]> */
</script>
</h2><noscript><p>Scripts disabled - Date and Time clock</p></noscript></div>
</code>
but it does not work, so wondered if there was an event handler I could use. The problem I have is that it is a date script that I only want on the bar so if I link to the script in the head, I still need to call it somehow. Can anyone help, I am new to all this javascript an EH and DOM