Click to See Complete Forum and Search --> : dynamic "home page" link


milt95033
10-19-2005, 02:16 PM
I have a perl script that makes web photo galleries. You give a set of pictures
to a run of the script and it makes a directory with a set of html pages and
pictures. These html pages are densely interlinked, i.e. there are several ways
a user can move around as he browses thru the photo gallery. The user gets
out of the gallery by clicking on a "HOME PAGE" link found on every page.
Currently the URL for this home page link is fixed text given to the script when
it runs, so it is baked into each of the gallery pages. This fact means that it
is not really possible to link to a single picture gallery from more than one web
page.

I would like to be able to have the user go back to the page from which he
first entered the photo gallery if he clicks on the "HOME PAGE" link. I would
think Javascript should be able to do this, but I don't know enough yet to
know how. It would seem to depend on whether it is possible to store a
value that stays active as the user browses across multiple pages thru the
gallery, but I haven't yet seen a discussion that makes this clear.

Anybody have any ideas or thoughts?

Many thanks.

--Milt--

felgall
10-19-2005, 03:58 PM
The best way would be to pass the original page in the search string from the link on that page and then have PERL bake it into the pages. That way you are not relying on your visitors having either Javascript or document.referrer enabled.

milt95033
10-20-2005, 09:01 AM
If I understand the reply by felgall, he is assuming that the perl script
runs when the photo gallery is browsed. This is not the case. I run
the perl script in advance to generate all the photo gallery pages
which are then posted on the web host. For one thing, running the
perl script takes too long to run dynamically (a minute or so for big
galleries), and for another thing, I don't have CGI capabilites on my
current web host, and I don't want to assume other users of the
script will have, or know how to use, CGI.

Does anybody have any idea how to do the original question I
posted?

Many thanks.

--Milt--

milt95033
10-21-2005, 08:41 PM
Bump.

Anybody?

Kravvitz
10-21-2005, 08:53 PM
I agree with felgall. You should not rely on JavaScript.

You should use a server-side language that has the capability of tracking a user as he/she moves to different pages of a web site.

CyCo
10-22-2005, 08:44 AM
milt95033,
Are you referring to a perl script named "popeye"?

milt95033
10-22-2005, 02:16 PM
milt95033,
Are you referring to a perl script named "popeye"?

No. This is a Perl script I wrote. When I scanned the various web photo
gallery formats in use, I didn't like any of them. They seemed too full of
fluff, instead of really showing the pictures. Also, I wanted to give the
user flexible ways of moving around in the gallery and a choice of sizes
at which to view the photos.

I haven't heard of "popeye". Is it something on CPAN?

With respect to the other comments, I guess it must be true that more
people disable javascript when browsing than I thought. I'm planning on
adding text pop-up boxes with the names of people in photos, which will
certainly require javascript, so this fact is a little disapointing to me.
With respect to the comment about using a server-side language, the
problem with that is that I don't have CGI support at the moment, and
also, I have at least one case of having the home page on one web
server and the gallery on another.

--Milt--