Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Replace part of page with additional html

  • Subject: Re: Replace part of page with additional html
  • From: Roy Schestowitz <newsgroups@schestowitz.com>
  • Date: Tue, 19 Jul 2005 10:06:37 +0100
  • Newsgroups: alt.html
  • Organization: schestowitz.com / Manchester University
  • References: <7t2pd1l09btqdm8oeqkaqomd40cfsjh219@4ax.com>
  • Reply-to: newsgroups@schestowitz.com
  • User-agent: KNode/0.7.2
Nonee wrote:

> Hello-
> 
>      I am designing a website with a menu and I would like to place
> the menu (which is in a table) on every page.  I would like to be able
> to call an external javascript function call to write it but I haven't
> quite figured out how.


JavaScript runs on the client's side. Why not use Server Side Includes
(SSI)? You can also use Perl script to add the menu offline.

I have some shell scripts that will apply the changes to a menu recursively.
I use it all the time for very many purposes including embedment of RSS
feeds in pages: http://www.schestowitz.com/Software/Search_and_Replace/


> I know that document.write('blah blah') could
> do it but that completely rewrites the entire site while I only want
> to put the table there, in between a title image and the rest of the
> web content.  I know there is innerhtml calls for IE but 1) I am not
> sure how it works and 2) I rather not shoot myself in the foot in the
> cross-compatibility factor.
> 
> Any ideas?
> 
> Thanks,
> 
>      Josh


Try to avoid JavaScript. Cross(platform)-compatibility would not be an
issue, but browser compatibility would. There is also a performance
penalty.

Roy

-- 
Roy S. Schestowitz
http://Schestowitz.com

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index