PDA

View Full Version : How to insert Javascript code within javascript?


smooth
01-07-2006, 04:43 PM
I would like to know how to write javascript such that, a part of it isnt considered as script, & rather as HTML.

To be specific, see here:

http://category1.orgfree.com/

The layered google ad is shown using the following code:

<script src='http://www.orgfree.com/category5/ads.php' type=text/javascript></script>


Ok, the layer div can be written using document.write. But, Google ad itself is a javascript isnt it. How can it be written into this? How does this work?

smooth
01-07-2006, 07:02 PM
Deos any1 know how this works?

smooth
01-07-2006, 07:49 PM
sorry for repost.. pls delete this post

felgall
01-07-2006, 09:44 PM
If you write out script tags using a document.write statement then that script will be added to the web page either at the point in the processing where it is written or immediately after the currently running script (it depends on the browser as to which of these two spots it gets written to). That script will then run once the code reaches that point in the processing.