View Full Version : How to call a js file

06-03-2003, 02:55 AM
I need to be able to call a js file from within a document.write staement. Here is an example of the document.write statement, I am currently using.

document.write('<a href="mailto:postmaster@traderdepot.com"><img src ="http://www.traderdepot.com/Bannerforbusiness.jpg"></a>')

If the document location is equal to a given url a certain banner will be displayed.

Instead of using the <a href="mailto:postmaster@traderdepot.com"><img src ="http://www.traderdepot.com/Bannerforbusiness.jpg"></a> I am wanting to use src="jsfile.js" for example.

When I place the src="jsfile.js" in the document.write statement the code stops working.

What should the code look like, to pull in the external js file.

06-03-2003, 05:47 AM

06-03-2003, 06:39 AM
<javascript src="javascript.js">

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum