[Xitami] directory listing locationbar
Marc Doigny
xitami@lists.xitami.org
Sat, 05 Jun 2004 21:11:43 +0200
At 19:14 5/06/04, you wrote:
>Hello Members,
>
>I'm a newbie in webpage creation and it's maybe a stupid question, so
>forgive me.
>Xitami 2.5b6
There are no stupid questions.
For a web server each request (main page, first gif, first jpg, first
javascript source, second gif, ... and so on) is a completely new one. The
browser has no memory of what was loaded before (except if it looks in the
logs).
To prevent the usage of your gif, you must create it on-the-fly (using a
script, for instance).
You also need some server scripts.
This is just one example, they are probably more possibilities:
<html>
<script src=cgi-bin/create.js></script>
<script>
function makegif(a)
{
document.write("<img src=' + a + b + '.gif'>");
}
</script>
<body>
<h1>This is my protected gif:</h1>
<script>
makegif("photos/special");
makegif("photos/second");
</script></body></html>
The function "makegif" in your html will create the call to the gif
on-the-fly, using the parameter that's provided by create.js
Now the special thing resides in create.js.
It's a script that produces a single output line (using a random generator)
var b = 124582134;
and renames the image to
photos/special124582134.gif and the same with the second gif.
For more help (and maybe an easier way to do it), you could ask it on the
webreference forum:
http://www.webdeveloper.com/forum/
marc