|
-
Dec 7th, 2001, 05:43 AM
#1
Thread Starter
Fanatic Member
equivalent to a loop
I like to know how to spread 100 images in rows and columns on a web page running against a directory. These images will be in thumb nail size.
Is javascript the answer here? My js is a bit weak. Can you give me a sample to work off?
I know how to do this in visual basic. I would use Do Loop with the Dir command.
Thanks
Bird of Prey
Mr. Bald Eagle.
[img][/img]
-
Dec 7th, 2001, 06:07 AM
#2
Hyperactive Member
Do you mean you want to do the following:
1) look at a directory on your server
2) count all the images in that directory
3) display all the images in that directory as thumbnails
-
Dec 7th, 2001, 01:47 PM
#3
Thread Starter
Fanatic Member
Either Server or local hard drive. I don't have a server.
Yes, to the rest.
Bird of Prey
Mr. Bald Eagle.
[img][/img]
-
Dec 10th, 2001, 04:21 AM
#4
Hyperactive Member
You'll need Perl, PHP, ASP(VBSCRIPT) or another Server Side Language, to do this as Javascript Can't access the file system!
Seeing as you know how to do it using VB, then ASP is probbably your best solution, but that all depends on what you host allows you to use!
If you want to use JavaScript, you will have to hard code (manually) the images perhaps into an array eg
Code:
var my_images = new Array();
my_images[0] = "/images/image.gif";
my_images[1] = "/images/image1.gif";
my_images[2] = "/images/image2.gif";
for (i = 0; i < my_images.length; i++){
document.write('<img src="' + my_images[i] +'">');
}
If you have a lot of images and don't want to use a server side language/technnology, you could always write a small VB App that creates the my_images array then copy and paste that into your webpage!
-
Dec 10th, 2001, 10:46 AM
#5
Frenzied Member
I wouldn't store them in an array, but yes, this is something you will need to do with a server-side technology. ASP works plenty well, and I have nothing against the FSO.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 10th, 2001, 10:48 AM
#6
Hyperactive Member
how would you store them then ??
-
Dec 10th, 2001, 11:41 AM
#7
Frenzied Member
I wouldn't. They are already stored by the FS, I don't need to do that again. The FSO has a method that will return a file name in a given folder. You can ask again, and it will return the next file in the folder.
Regretably, the documentation at MSDN not only sucks, but continues to change location and text. It is a calibur of mental disfunction that I can't begin to fathom.
'Course, if you don't want to use VBScript to do this, you could make a PerlScript ASP. This is a fair sight easier, but the documentation is several orders of magnitude better.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 11th, 2001, 06:59 AM
#8
Thread Starter
Fanatic Member
can you give me an idea of what asp looks like? I am doing aspx now and have never touched asp.
Here is something I found for thumbnail. Is this a good method? If it is a good method, please explain whats he mean in plain english.
http://www.btinternet.com/~truesilen...ages/popup.htm
Bird of Prey
Mr. Bald Eagle.
[img][/img]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|