Seraph
02-23-2004, 03:16 AM
Hi!
I need some help.
What I want to do is be able to generate a web page which consists of:
A big image,
a link to a text file about that image, if the text file exists,
a link to the source (how the image was made) of that image, if the source exists.
And I want all this to be automatically generated just by passing in the name of
the image file (which is the same as the name of the other two files, just with
different extensions).
i.e. something like:
<img src=filename".jpg">
if ( FileExists( filename".txt" ) ) <a href=filename".txt">view text</a>
if ( FileExists( filename".pov" ) ) <a href=filename".pov">view source</a>
As far as I can see this seems to be impossible in javascript!
Can anyone tell me how to do this? It sounds like such a simple thing!
If I can't figure it out I might just generate one html page for every image, but that's a rubbish way to do it.
Your help is much appreciated.
I need some help.
What I want to do is be able to generate a web page which consists of:
A big image,
a link to a text file about that image, if the text file exists,
a link to the source (how the image was made) of that image, if the source exists.
And I want all this to be automatically generated just by passing in the name of
the image file (which is the same as the name of the other two files, just with
different extensions).
i.e. something like:
<img src=filename".jpg">
if ( FileExists( filename".txt" ) ) <a href=filename".txt">view text</a>
if ( FileExists( filename".pov" ) ) <a href=filename".pov">view source</a>
As far as I can see this seems to be impossible in javascript!
Can anyone tell me how to do this? It sounds like such a simple thing!
If I can't figure it out I might just generate one html page for every image, but that's a rubbish way to do it.
Your help is much appreciated.