Psapg wrote:
Hi!
I'm new to javasript, and i must confess to have borowed a few free scripts
from the net to satisfie my needs....
Still i can't find even an idea of ascipt to do this...
Please Help!!!
I have a webserver setup in my home, with an index file that is an access
comtrol page, that, if the authentication is sucessfull, takes the user to a
specific directory.
In this directory I only have image files in .jpg format.
I need to create a page were the user can either browse the entiry
directory, or specify a filename to search for, wildcards enabled, and
beiing able to see a reduced size image in the result page when hovering the
image/file result link.
Any Ideas?
Use normal file sharing? :-)
The solution is best done server-side, which might be written in
JavaScript but probably would be better in some other language. A
script-based, client-side solution to generate image thumbnails would
be very inefficient; using it to generate document thumbnails is
probably impossible for all practical purposes. Having them generated
every time a visitor comes to the page would be plain wasteful and very
inelegant.
Some OS's allow you to specify actions when the contents of a directory
are changed, others allow a program to run a set intervals to check if
the contents have changed. A script could generate the thumbnails and
update the index page accordingly whenever a file is added or removed
(or shortly thereafter).
There are plenty of programs to generate image thumbnails, but
generating document thumbnails would remain a real challenge if various
file formats are to be supported.
The 'search and display' part could be done easily in JavaScript,
provided the listing and thumbnails are already available and the user
has some idea of how to use regular expressions.
--
Rob