Forum Moderators: open
So I have set up a SSI page that sites the Google code. All I need to know now, is where to place the <!--#include file="adsense.html" -->
so it appears in the correct spot.
The JS toolbar looks like this:
document.write('<tr>')
document.write('<td valign="top">')
document.write('<div style="width: 160;">')
document.write('<div class="nav_link"><a href="index.html">Home</a></div>')
document.write('<div class="nav_link"><a href="blogger.html">Blog</a></div>')
document.write('<div class="nav_link"><a href="columns.html">Columns</a></div>')
document.write('<div class="nav_link"><a href="published.html">Published Works</a></div>')
document.write('<div class="nav_link"><a href="books.html">Book Reviews & Quotations</a></div>')
document.write('<div class="nav_link"><a href="topten.html">Top Tens</a></div>')
document.write('<div class="nav_link"><a href="pop.html">Pop Culture</a></div>')
document.write('<div class="nav_link"><a href="misc.html">Misc</a></div>')
document.write('<div class="nav_link"><a href="aboutme.html">About Me</a></div>')
document.write('<div class="nav_link"><a href="faq.html">F.A.Q</a></div>')
document.write('<div class="nav_link"><a href="contact.html">Contact</a></div>')
document.write('</div>')
document.write('</td>')
document.write('<td id="main" valign="top" width="100%">')
And then each HTML page cites that bar like this:
<script language="javascript" type="text/javascript">javascript:header();</script>
How can I make it so the SSI placement of the Ad code appears directly under the "Contact" link?
Thanks so much
If you are looking to use the server-side include within the Javascript file, then it can't be done. In fact there is a fundamental weakness with your current setup, in that your entire menu is dependent on Javascript, making it "unspiderable" as no search engine spiders can read external Javascript files.
Your best solution is to bite the bullet and replace the Javascript call on each page with an SSI or (even better) a PHP include, then have your menu markup (as plain HTML, not written out in JS) as well as your AdSense code within the file called by that include. There are a number of tools which can do a global search/replace across many files, so even if you have a lot of pages the change won't be to difficult.
You should avoid changing the file names if possible even if you are using server-side includes. Dependent on the type of server you are using, you can let files ending in .html be parsed for SSI.