Using SSI directives as innerHTML strings

Using SSI directives as innerHTML strings

am 05.04.2008 06:44:22 von Jim Boyle

Hi,

I hope this is the right place to post this, and my apologies (and a
request for the correct group) if it's not.

I'm supporting a web page that is mainly made up of pictures (the site
is for a high school marching band - many different pages covering
ensembles, years and events). To keep each photo gallery dynamic,
I've written a perl script that builds html script code (javascript),
creating an array of pictures located in a specific directory and
calling the javascript function that renders the gallery. This perl
script is called via SSI directives. Arguments to perl script are set
using the SSI 'set' directive and passed in using the 'include'
directive. Everything works fine when the SSI directives are coded
directly into an shtml page.

Some of these galleries are fairly large and in order to shorten load
time and to use less memory, I created a menu where each link in the
menu calls a function that changes the innerHTML of the 'div' where
the pictures are displayed to different iterations of SSI
directives . I know this function works, because when the encoded
strings are not SSI directives, the strings are displayed properly.

My question is this. Can javascript (or html script elements in
general) be use to set the innerHTML value of an element to code that
should create SSI directives?

Thanks for your help.

Jim

Re: Using SSI directives as innerHTML strings

am 05.04.2008 19:04:23 von David Dorward

Jim Boyle wrote:

> My question is this. Can javascript (or html script elements in
> general) be use to set the innerHTML value of an element to code that
> should create SSI directives?

No, server side directives are processed on the server. If you add them to
the document with client side programming, it is far too late for the
server to process them.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/