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

Tim Luoma luomat at peak.org
Wed Jul 24 08:29:01 CDT 2002


Mark Howells wrote:

 > I toyed with this a few years ago and found that the quickest (and
 > very much dirtiest) way was to use document.write in the footer.js
 > file to write the footer of the page. It's slow, inaccessible and
 > doesn't validate

Well it would validate because the JS would be in an external file, but
you're right about this being hackish (and, in fact, what I'm doing
already ;-)



 > (and that's before we get onto search engine
 > accessibility and browsers without Javascript).

Well that's why there would be a link to the footer page in the <noscript>


 > Is there a reason why you can't switch to alternative web server
 > software, such as Apache?

There is a reason, although it's not a good one.

The site is basically just a small "hey we've got a webpage!" site that
is hosted for free by the company's DSL provider.  The hosting company
reserves PHP, etc for paid sites, and there are no funds right now for a
real webhost

("Why would we pay for one when we've got one free?" ....
"um, because it limits what you can do and makes it much harder for you
to make any of the changes you want to see".....
"But it's free!")

I'm developing the site for free in my "spare time" (ha ha) so I'd
rather not shell out for a real host either.


Craig Saila wrote:

> Depending on the site's target browser audience (i.e., fifth generation
> and higher), you may want to consider building it using the W3C's DOM.
> Scott Andrew Le Pera has a good tutorial on this:
> <http://www.scottandrew.com/weblog/articles/dom_1>

Hrm... interesting idea.   I don't know much 'bout no DOM neither (sorry
for the atrocious grammar today) but maybe this would be a good chance
to get my feet wet.


> One big catch with using the JavaScript call is that anyone with a
> browser that doesn't support it (which is about 10% of the browsers out
> there) won't see the footer.

Hence the <noscript> footer link.


TjL,
not a JS fan anyway






More information about the thelist mailing list