473,788 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

image gallery - it should be easier than this


All I want to do is to read a list of the image files in my folder and
display them on a page. That way I don't have to re-write the page, I
can just upload extra images.

I don't need fancy bells or whistles or slide shows or sliders or
anything.

The smallest google search I come up with offers a million pages, most
of them bells and whistle types and I can't find the wood for the trees.

Can anybody help please?

Richard
--

Aug 6 '06 #1
11 1433
Richard said the following on 8/6/2006 4:46 AM:
>
All I want to do is to read a list of the image files in my folder and
display them on a page.
Unless you have server side scripting available then you won't be able
to as javascript has no way to access the server file system.
That way I don't have to re-write the page, I can just upload extra images.
I don't need fancy bells or whistles or slide shows or sliders or anything.
What you could possibly do is upload your images, get an FTP listing,
copy it to a text file, create an array from the names, then upload that
file as a .js file and include it in the page.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 6 '06 #2
In message <DZ************ *************** ***@comcast.com >, Randy Webb
<Hi************ @aol.comwrites
>Richard said the following on 8/6/2006 4:46 AM:
> All I want to do is to read a list of the image files in my folder
and display them on a page.

Unless you have server side scripting available then you won't be able
to as javascript has no way to access the server file system.
>That way I don't have to re-write the page, I can just upload extra images.
I don't need fancy bells or whistles or slide shows or sliders or anything.

What you could possibly do is upload your images, get an FTP listing,
copy it to a text file, create an array from the names, then upload
that file as a .js file and include it in the page.
Hmm... this is where our definitions of "simple" differ. ;-)

That is beyond my skills at the moment.

I've found a program that does a neat version here on my own PC and
generates the html page, as in:-

http://www.topshareware.com/Actual-W...load-13520.htm

Which can be set up to produce this:-

http://www.squeaky.demon.co.uk/Freec...y/gallery.html
So far it's the best way I've found.
<sigh>

Thanks for your reply ;-)

Richard

--

Aug 6 '06 #3
Randy Webb wrote:
Richard said the following on 8/6/2006 4:46 AM:
>>
All I want to do is to read a list of the image files in my folder and
display them on a page.

Unless you have server side scripting available then you won't be able
to as javascript has no way to access the server file system.
>That way I don't have to re-write the page, I can just upload extra
images.
I don't need fancy bells or whistles or slide shows or sliders or
anything.

What you could possibly do is upload your images, get an FTP listing,
copy it to a text file, create an array from the names, then upload that
file as a .js file and include it in the page.
I also have a CMS/images-display question.. is is at all possible,
either with JS or server-side (which in my case would be either Java or
PHP) to detect DIMENSIONS of the images? I do not want a system which
sizes images for you.. I want images to display at exactly same
dimension they are.. I was reading this the other day..

http://www.alistapart.com/articles/magazinelayout/

but he seems to be implying only way to to do this is by letting system
determine dimensions of images.. is there another way?

thanks..
Aug 6 '06 #4


OK...

I can have a page with two frames and into frame2 I could load

www.sompage.com.foldername/

Which, with no index file present, will give me a listing of all the
files in that folder.

Given that these are image files, can I read and parse the text present
in frame2 and parse it and hand it to javascript in frame 1 as a
variable so that I can then load the image into a table cell?

Richard, feeling brain damaged.

--

Aug 6 '06 #5
maya said the following on 8/6/2006 10:36 AM:
Randy Webb wrote:
>Richard said the following on 8/6/2006 4:46 AM:
>>>
All I want to do is to read a list of the image files in my folder
and display them on a page.

Unless you have server side scripting available then you won't be able
to as javascript has no way to access the server file system.
>>That way I don't have to re-write the page, I can just upload extra
images.
I don't need fancy bells or whistles or slide shows or sliders or
anything.

What you could possibly do is upload your images, get an FTP listing,
copy it to a text file, create an array from the names, then upload
that file as a .js file and include it in the page.

I also have a CMS/images-display question.. is is at all possible,
either with JS or server-side (which in my case would be either Java or
PHP) to detect DIMENSIONS of the images?
PHP can read image dimensions on the server:

<URL: http://us2.php.net/manual/en/function.getimagesize.php >

Then, PHP can tell your script what it needs to know.

I do not want a system which sizes images for you.. I want images
to display at exactly same dimension they are.. I was reading this
the other day..
http://www.alistapart.com/articles/magazinelayout/
Now I remember why I don't read alistapart anymore.
but he seems to be implying only way to to do this is by letting system
determine dimensions of images.. is there another way?
That's not the implication I got from the article but there is another
way, see above.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 6 '06 #6
Richard said the following on 8/6/2006 11:19 AM:
>
OK...

I can have a page with two frames and into frame2 I could load

www.sompage.com.foldername/

Which, with no index file present, will give me a listing of all the
files in that folder.
That is what I was talking about doing. Open that page in your browser,
copy the image names, and then strip out the text you don't want, wrap
each name in "<imageName >" and make it an entry in an array. Save the
file as a .js file and then include that file in the real page.
Given that these are image files, can I read and parse the text present
in frame2 and parse it and hand it to javascript in frame 1 as a
variable so that I can then load the image into a table cell?
Maybe, depending on the browser and what kind of file/listing the server
gives.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 6 '06 #7
In message <hY************ *************** ***@comcast.com >, Randy Webb
<Hi************ @aol.comwrites
>Richard said the following on 8/6/2006 11:19 AM:
> OK...
I can have a page with two frames and into frame2 I could load
www.sompage.com.foldername/
Which, with no index file present, will give me a listing of all the
files in that folder.

That is what I was talking about doing. Open that page in your browser,
copy the image names, and then strip out the text you don't want, wrap
each name in "<imageName >" and make it an entry in an array. Save the
file as a .js file and then include that file in the real page.
Now THIS is the bit that's currently beyond me. I'm self taught so I
have a good few gaps. I don't mind learning and bashing code about
until it begs for mercy - I take it you DO mean that I can do all that
with javascript?
>
>Given that these are image files, can I read and parse the text present
in frame2 and parse it and hand it to javascript in frame 1 as a
variable so that I can then load the image into a table cell?

Maybe, depending on the browser and what kind of file/listing the
server gives.
Hm...
Richard
--

Aug 6 '06 #8
Randy Webb wrote:
maya said the following on 8/6/2006 10:36 AM:
>Randy Webb wrote:
>>Richard said the following on 8/6/2006 4:46 AM:

All I want to do is to read a list of the image files in my folder
and display them on a page.

Unless you have server side scripting available then you won't be
able to as javascript has no way to access the server file system.

That way I don't have to re-write the page, I can just upload extra
images.
I don't need fancy bells or whistles or slide shows or sliders or
anything.

What you could possibly do is upload your images, get an FTP listing,
copy it to a text file, create an array from the names, then upload
that file as a .js file and include it in the page.

I also have a CMS/images-display question.. is is at all possible,
either with JS or server-side (which in my case would be either Java
or PHP) to detect DIMENSIONS of the images?

PHP can read image dimensions on the server:

<URL: http://us2.php.net/manual/en/function.getimagesize.php >
really? that's great!! :) thank you...
Aug 6 '06 #9
Richard said the following on 8/6/2006 5:03 PM:
In message <hY************ *************** ***@comcast.com >, Randy Webb
<Hi************ @aol.comwrites
>Richard said the following on 8/6/2006 11:19 AM:
>> OK...
I can have a page with two frames and into frame2 I could load
www.sompage.com.foldername/
Which, with no index file present, will give me a listing of all the
files in that folder.

That is what I was talking about doing. Open that page in your
browser, copy the image names, and then strip out the text you don't
want, wrap each name in "<imageName >" and make it an entry in an
array. Save the file as a .js file and then include that file in the
real page.

Now THIS is the bit that's currently beyond me. I'm self taught so I
have a good few gaps. I don't mind learning and bashing code about
until it begs for mercy - I take it you DO mean that I can do all that
with javascript?
You could write a script that would read the list from a web page,
maybe, and then try to parse out the filenames. But it's a lot simpler
to do it manually.

var images = new Array()
var num = 0;
images[num++] = "name of first image";
images[num++] = "name of second image";
images[num++] = "name of third image";

It is quite simple to do that with a text editor with a good
Find/Replace in it. Remove all the text except image names, then
Find/Replace.

Find: ^P
Replace with: ";^Pimages[num++]="

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 7 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3401
by: DaRemedy | last post by:
Hiya, Can anyone kindly help me to get started in creating a PHP/MySQL image gallery, it doesn't have to be anything fancy, just something that automatically reads the images in the folder and displays it. Cheers DaRemedy
0
502
by: Perttu Pulkkinen | last post by:
Does anybody know a php-based image gallery, where final looks of the actual site would not be determined by the application? I mean that there would only be a php-library of objects/functions that could be used to incorporate folders and images to any kind of website with personal appearance. (Of course administration application should be ready made. I'm not talking about "send your favorite pics"-community, but image gallery as a part...
2
2534
by: robert | last post by:
I've made a gallery site for an artist and it works well -- the gallery page has a central large image which is swapped when thumbnail images are clicked. I'm using Dreamweaver's "SwapImage" behavior. The problem is that this fails under certain versions of IE and possibly NN on PCs and Macs -- I haven't gotten my client to send me details of what version he's using (sorry) or any of my 'beta testers' -- but I'm really getting frustrated....
8
4819
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client clicks the "gallery" link, a cgi script could search the gallery/ dir, and create thumbnails of any jpeg images that don't already have a thumbnail associated with them. The script could then generate a page of clickable thumbnails. A few questions:
0
4201
by: numbnutz | last post by:
Hi, I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and accompanying captions. The gallery has more than one image and the user can navigate the gallery by clicking forward and backward buttons to take then through the images: var galleryXML = new XML(); galleryXML.ignoreWhite = true;...
5
2122
by: dabhand | last post by:
Hi This page http://www.dabhand.co.nz/ayupdev/gallery-riders.html works great in IE but not in Firefox... any help would be appreciated. It refers to an external javascript file which I have included the code to below: The file name is imgriders.js - as referred to in source of the html file above. if (document.images) { image1 = new Image; image2 = new Image; image3 = new Image;
10
6778
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE from Netscape. IE is ok but the Netscape browser including Firefox and Safari are not working now. Not sure why. The idea is that when you mouseover the arrows the gallery div moves to left and right. I have changed the script and now the image...
25
4152
by: Gilles Ganault | last post by:
Hello I've been googling for a couple of hours, but still haven't found what I need: - really simple PHP-based image gallery software. Ideally, just a single file that I just drop into a directory filled with JPG files - uses eg. GD to generate thumbnails automagically, and saves them into a sub-directory for the next time (I don't want thumbnails to be regenerated every time someone views the pictures) - as an option, supports...
4
2047
by: saunders1989 | last post by:
Hi, my goal is to create a website with an image gallery. i have about 6 buttons at the bottom of the page whcih when clicked will take you to a different album of photos. i have created the login page and the next step is to create the upload form to a database. these are the tables i am going to intened to use: TABLE: Gallery gID - auto incrementing unique ID
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.