Using SSI directives as innerHTML strings

J

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
 
D

David Dorward

Jim said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top