POV-Ray : Newsgroups : povray.general : Linked POV-museum page is up and a java question : Re: Linked POV-museum page is up and a java question Server Time
10 Aug 2024 17:31:41 EDT (-0400)
  Re: Linked POV-museum page is up and a java question  
From: Johannes Hubert
Date: 29 Jan 2000 06:28:33
Message: <3892cee1@news.povray.org>
David Fontaine <dav### [at] faricynet> wrote in message
news:3891F5D0.9ABF951F@faricy.net...
> BTW someone said it would be better to link to the actual pics rather than
> the galleries; I didn't do this because AFAIK, isn't it bad netiquette? If
> you have an idea as to how to set up the links to go to the pic AND the
> gallery, tell me :-)

With a bit of JavaScript, do it like this (I write this off my head, there
are probably bugs in it, but you can catch the drift, if you need more help,
say so):

<script>
function showLink(pageName, pageURL, imageName, imageURL)
{
    doc = window.document;
    doc.writeln('<html>');
    doc.writeln('<head>HEADER STUFF HERE</head>');
    doc.writeln('<body>');
    doc.writeln('<p align="center">Artist Homepage: <a href="' + pageURL +
'">' + pageName + '</a></p>');
    doc.writeln('<p align="center">' + imageName + '</p>");
    doc.writeln('<p align="center"><image src="' + imageURL + '"></p>");
    doc.writeln('</body>');
    doc.writeln('</html>');
}
</script>


Somewhere, in your link you write (example):

<a href="???" onclick="showLink('Gilles Tran Homepage', 'http://www...',
'Image-Name', 'http://www..../...jpg'; return false">

A click on the link will start the JavaScript.
The script will replace the page with a new page, which contains a link to
the homepage of the artist, the name of the image, and the image itself.
I don't know if you need to have a valid URL in the href (where I wrote
"???"), I think it is not needed (because of the "return false" later in the
line), but you might have to experiment.
Of course, you can adjust the script to write a HTML page that fits into
your design (colors etc.).

Greetings,
Johannes.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.