This topic is now archived and is closed to further replies.

html and images

This topic is 5132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to write a html page that contains all jpg files in its own directory without knowing the names of the files? It doesn''t have to look pretty, just show the pictures. I know a little html, and I could include a known image.

Share this post

Link to post
Share on other sites
I think I know what you mean; what you're going to have to do is do that through something like PHP, ASP, etc ..

What you would have to do is create a file stream object and run a loop on folder contents, only pulling back jpg's (There should be an option to return the extention of a file. then just either response.write() it or echo ""; it with the img tags.

Other then that, html won't give you what you need; html is just fancy layout code for web browsing.

Original post by nagromo
OK, can I create a thumbnail image without saving a separate resized file? If so, how could I display an image at a % of its size?

I believe you can use

<img src='ImageName.gif' width='50%' height='50%' alt=''>

[edited by - PumpkinPieman on November 29, 2003 3:15:20 PM]

Share this post

Link to post
Share on other sites
You'll need a server-side script or CGI program. Here's a quick ASP program I wrote:

Set FSO = CreateObject("Scripting.FileSystemObject")

'find images
Set f = FSO.GetFolder("C:\mywebsite\imgs\")
Set fc = f.Files
For Each f1 In fc
If Right(f1.Name, 3) = "jpg" Then
Response.Write "<img src='\imgs\" & f1.Name & "'>"
End If

[edited by - JNewt on November 29, 2003 4:16:09 PM]

Share this post

Link to post
Share on other sites