M
Mike Blackett
Hi all,
I have several folders of images. Inside each folder is a JS file defining
an array of the images with a description of each image.
When a user selects a 'gallery'/folder on my site, I want to be able to load
in this JS file and create the HTML page of the images and descriptions.
Before you say "use a database...", I can't due to the hosting company.
Also, I want to make this simple for the users to update.!
The other method I use at the minute is to have the HTML already created
with the GALLERY.JS definded in the <HEAD> and just call that with a script
to create the images, but that means each HTML page is the same except for
the JS definition - which is just a waste - I want to do this dynamically.!
example...
Gallery 1 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page1/gallery.js"></script>
</head>
...
Gallery 2 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page2/gallery.js"></script>
</head>
...
I can't find away to call the
<script language="JavaScript" src="xxxxx/gallery.js"></script>
line from within a script.
I have several folders of images. Inside each folder is a JS file defining
an array of the images with a description of each image.
When a user selects a 'gallery'/folder on my site, I want to be able to load
in this JS file and create the HTML page of the images and descriptions.
Before you say "use a database...", I can't due to the hosting company.
Also, I want to make this simple for the users to update.!
The other method I use at the minute is to have the HTML already created
with the GALLERY.JS definded in the <HEAD> and just call that with a script
to create the images, but that means each HTML page is the same except for
the JS definition - which is just a waste - I want to do this dynamically.!
example...
Gallery 1 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page1/gallery.js"></script>
</head>
...
Gallery 2 page...
<html><head><title></title>
<link rel="stylesheet" type="text/css" href="../styles.css">
<script language="JavaScript" src="page2/gallery.js"></script>
</head>
...
I can't find away to call the
<script language="JavaScript" src="xxxxx/gallery.js"></script>
line from within a script.