I have this in my page:
Code:
<script src="scripts/jscript.js" language=javascript type="text/javascript">
LinkToMainSite();
</script>
And this in my external .js file:
Code:
function linkToMainSite() {
 if (window.name != 'newWin') {
 document.write('<a href="<A href='http://www.aurl.co.uk">Visit'>http://www.aurl.co.uk">Visit home page</a>');
 }
}
But nothing happens. I don't get the expected "Visit Home Page" link in the main page.

The script works fine when embedded into the page itself, it's just when it is in the external file that it stops working.

Any thoughts?

Cheers