473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can ASP find all images in a file?

Hello,

Using ASP, can all the images in a file be listed, so I can then get ASP to
determine the combined size of these files to give an estimate of load time?

Thanks for any help

Gram.

Jul 19 '05 #1
4 1540
This would be a lot of work, but you could parse the html file with the FSO,
find all instances of <img, resolve that to the file system, and use the fso
to determine the size of the file. There isn't anything built in to ASP
that will magically do this for you.

Ray at work

"Gram" <gr******@hotmail.com> wrote in message
news:27***************@news.indigo.ie...
Hello,

Using ASP, can all the images in a file be listed, so I can then get ASP to determine the combined size of these files to give an estimate of load time?
Thanks for any help

Gram.

Jul 19 '05 #2
Thanks Ray,
Yah, I know theres no magic function or anything. I just hoped there might
be a better way than one I'd come up with myself. Any ideas you have would
be great, as I 'd like to create a page to show all the links in a html page
too if thats possible.

Gram.
Jul 19 '05 #3
I don't know about other browsers, but Internet Explorer can do all this, so
maybe you should just train your users to do that.

Ray at work

"Gram" <gr******@hotmail.com> wrote in message
news:Tr***************@news.indigo.ie...
Thanks Ray,
Yah, I know theres no magic function or anything. I just hoped there might
be a better way than one I'd come up with myself. Any ideas you have would
be great, as I 'd like to create a page to show all the links in a html page too if thats possible.

Gram.

Jul 19 '05 #4
"Gram" <gr******@hotmail.com> wrote in message
news:Tr***************@news.indigo.ie...
Thanks Ray,
Yah, I know theres no magic function or anything. I just hoped there might be a better way than one I'd come up with myself. Any ideas you have would be great, as I 'd like to create a page to show all the links in a html page too if thats possible.

Gram.


You may want to consider using the Document Object Model (DOM) to
retrieve a collection of the image nodes. Here are the three (3)
relevant methods

getElementsByNameNS (XHTML Preferred)
getElementsByName (HTML Preferred)
document.images (Deprecated. Included for backward compatibility)

More information on the DOM can be found here:

http://www.w3c.org/DOM/

Could you provide some more details on what you are trying to
accomplish? Specifically:

1. Is the document in question remote or local?
2. If local, is the document static or dynamic?
3. Are the images local,remote or mixed?

In broad strokes, what you do is load the document using MSXML2 and
iterate the collection returned by getElementsByName. How you load the
document depends on whether the document is local/static or
remote/dynamic.

HTH
-Chris

Jul 19 '05 #5

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

Similar topics

4
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I...
1
by: Dan Jones | last post by:
I'm writing a script to process a directory tree of images.  In each directory, I need to process each image and generate an HTML file listing all of the images and links to the subdirectories....
3
by: ningjun.wang | last post by:
Hello: My html file contains the following image link: <a href="some_url"><img src="MyImage.gif"></a> How can I use Javascript to find out the value of some_url for the given image name...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
3
by: Saber | last post by:
There are some Images (System.Drawing.Image) with same widths and heights, I want to find if 2 images are equal. How can I do it? The following code always returns false: If ...
10
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without...
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
2
by: Simon Wigzell | last post by:
I have inherited a database driven website that comes with a table of image links. The images are scattered all of the internet and there are thousands of them. I would like to write an asp script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.