[thelist] Re: JS help: including a file as footer

Mark mcoady at bigfoot.com
Wed Jul 24 22:20:42 CDT 2002


dunno if you've already found an answer, i'm on digest so i'm a bit behind...

if you can't use ssi, and you haven't got server extensions like php or ihtml or
something then the only way is client side. i guess that's why you're looking at js.

this works (just tested) on opera6, moz1, ie5.5, nn4.08, nn4.77, nn3 gold (!!!) on
windoze...

page.html:
^^^^^^^^^^
<html>
<head>
</head>
<body>
<pre>





	stuff...





</pre>
<script src="footer.js" type="text/javascript"></script>
</body>
</html>


footer.js:
^^^^^^^^^^
document.write("<table align=\"center\" width=\"100%\">"+

"<tr><td bgcolor=\"#ffcc00\" align=\"center\">This is my kewl footer!</td>"+

"</tr></table>");



you'll still need to take care of the <noscript> people tho'...

hth,

--

_|_|_
Mark




More information about the thelist mailing list