JJM wrote:
I have a page where I would like to display a picture and a short textual
explanation of the picture. I have several pictures that I would like to
display all linking from a previous page. At present what I'm doing is
linking each thumbnail to an individual html page showing the larger image
with the text. It struck me that as the rest of the page is the same and
only the large image and text change for each thumbnail cann I not have a
single page and pass parameters indicating which image and text to use
While it is /possible/ to do this using JavaScript, it is not a good idea.
Client side scripting is excellent for enhancing content, but not reliable
enough to depend on to /generate/ content (well, unless you don't care
about 10%[1] of your visitors including search engine indexing robots).
This is more a job for a server side process such as CGI (with Perl, Python,
Ruby, or another language handling the HTML generation), mod_perl, PHP, ASP
(with VBScript, PerlScript or JScript), JSP, etc.
You can form your URL along the lines:
http://www.myserver.com/myPage.cgi?i...xt=some%20text
or, with some trickery
http://www.myserver.com/myPage/this.jpeg/some%20text
Then you can read the variables back in the script and stick them in
placeholders in the document.
Going a stage further, you could store the data in a database on the server,
and then provide much shorter (and cleaner) URLs.
http://www.devshed.com/ is a reasonable place to start learning about server
side programming.
[1] Usual warnings about statistics apply
--
David Dorward
http://david.us-lot.org/