Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#93810 - 14/05/2002 10:21 Web authoring question. Don't hurt me!
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Sorry, it's me again.

I was just wondering if there was a simple way to graphically represent the explorer loading bar on a page?



Attachments
92238-load.gif (108 downloads)

_________________________
Matt

Top
#93811 - 14/05/2002 10:36 Re: Web authoring question. Don't hurt me! [Re: Dignan]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Animated GIF? Does it need to be accurate, or just an image?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#93812 - 14/05/2002 10:45 Re: Web authoring question. Don't hurt me! [Re: pgrzelak]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
accurate
_________________________
Matt

Top
#93813 - 14/05/2002 10:50 Re: Web authoring question. Don't hurt me! [Re: Dignan]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Perhaps javascript, loading an updated image at certain points of your page load. It could be set on a timer, or you could code it to swap the image at predetermined points. What are you looking to do?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#93814 - 14/05/2002 10:56 Re: Web authoring question. Don't hurt me! [Re: Dignan]
David
addict

Registered: 05/05/2000
Posts: 623
Loc: Cambridge
But even the real IE progress bar isn't acurate....

What are you using the bar to signify? Time elapsing or actual loading progress?

Top
#93815 - 14/05/2002 10:58 Re: Web authoring question. Don't hurt me! [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
If you are using the Explorer DLL (shdocvw.dll) to do the work, then I think it's got hooks to automatically handle the percentage bar. Just a question of interfacing the right controls to the DLL. Have you looked in MSDN?
_________________________
Tony Fabris

Top
#93816 - 14/05/2002 11:05 Re: Web authoring question. Don't hurt me! [Re: Dignan]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
You could do it with Macromedia Flash but then you force everybody to have to use Flash...

- Trevor

Top
#93817 - 14/05/2002 11:08 Re: Web authoring question. Don't hurt me! [Re: pgrzelak]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
loading updated images at certain points might be possible, but this is for a page that's loading a lot of images already, so it might defeat the purpose. However, that would be a solution I'm willing to go with if possible.

I'm sur ethe actual load bar might be pretty inacurate, but it still does a fairly good job at representing how much \has loaded on the page.

Tony, I'm afraid I don't really understand what you were saying
_________________________
Matt

Top
#93818 - 14/05/2002 11:36 Re: Web authoring question. Don't hurt me! [Re: Dignan]
David
addict

Registered: 05/05/2000
Posts: 623
Loc: Cambridge
I don't know the full details of what your site is like or you are trying to achieve, but if the page has so many images on it that you need a separate loading bar, then it might be easier to simplify the page and/or break it up into multiple pages. Anyone with a slow connection would get bored of waiting (I get bored of waiting for pages to load with a fast connection), progress bar or not.


Edited by David (14/05/2002 11:37)

Top
#93819 - 14/05/2002 11:41 Re: Web authoring question. Don't hurt me! [Re: David]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Yeah, I knkow, but still....

it's not that it requires a seperate loading bar, it's that it would be cooler.

Plus, the page is an image gallery anyway, so I can't quite simplify it. I also pretty much had to make it this way.
_________________________
Matt

Top
#93820 - 14/05/2002 21:11 Re: Web authoring question. Don't hurt me! [Re: tman]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
You could do it with Macromedia Flash but then you force everybody to have to use Flash...

Yeah. also, I thought you could only show the progress of the flash's loading, not everything. am I wrong?
_________________________
Matt

Top
#93821 - 14/05/2002 21:42 Re: Web authoring question. Don't hurt me! [Re: Dignan]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Ok, a loading bar in HTML requires HTML 4.0 code, and JavaScript.

Basic summary, put an on load event into every image. Have the javascript increment a percentage bar based on the on load event. A bar built out of tiny graphics being switched from a 1x1 color to another 1x1 color works well, simply use the width and height tags to stretch them. Now for the fun part, the Javascript needs to know ahead of time how many onloads will exist to make the percentage bar somewhat accurate. Precise accuracy will require the file size of each image.

All in all, it's a mess, and may not be worth it. If you have a slow connection, check out http://www.perilith.com/~drakino/b52/ , it's one of my DHTML play sites that I never finished, and does have a load bar. On my broadband, it loads too quick to be really seen though.

Top
#93822 - 14/05/2002 22:00 Re: Web authoring question. Don't hurt me! [Re: drakino]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Thanks, and I understand this all in concept, I just wish my JS skills were...well...existent

I don't really need the precise accuracy you were talking about, just a vague idea. But in case I wanted to, would that file size be calculated from the collection of images on the server, or inside the image tags (in which case it would be the first time a forced Frontpage code was useful).

I don't know about you, but I guess my cable connection was slow enough to see that load bar in action. I like it!
_________________________
Matt

Top
#93823 - 15/05/2002 13:24 Re: Web authoring question. Don't hurt me! [Re: tfabris]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
If you are using the Explorer DLL (shdocvw.dll) to do the work, then I think it's got hooks to automatically handle the percentage bar.

If you mean ProgressChange event, it is wildly inaccurate. (I often use Shell.Explorer ActiveX control in my Panther courses to illustrate component reuse via COM.)
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#93824 - 15/05/2002 16:34 Re: Web authoring question. Don't hurt me! [Re: Dignan]
NiCKEL
journeyman

Registered: 27/02/2002
Posts: 59
Loc: Vancouver, BC, Canada
You could use a table to represent the blue instead of an image.

You should be able to update the column width property via javascript to make it look more or less loaded.

something like
<table width=100 bgcolor='silver'>
<tr>
<td width=50 bgcolor='blue' id='width'></td>
<td>
</tr>
</table>
would look 50% loaded.
Then manipulate the column 'width' value width and you should be rocking.

Check out:
http://www.js-examples.com/example/?ex=894&mode=1

You could probably create a single function which reads the current width of 'width' and increments it by 100/#images. If you then call that function from the finished loading event of all images it aught to provide a rough estimate.

Top
#93825 - 15/05/2002 17:31 Re: Web authoring question. Don't hurt me! [Re: NiCKEL]
NiCKEL
journeyman

Registered: 27/02/2002
Posts: 59
Loc: Vancouver, BC, Canada
Well... I did it.

http://pernocto.com/load/


Presently you need to add
onload="StatusUpdate()"

to every image that is updating and set
var iIgnore=X;

making X = to the number of images that don't count.

You aught to be able to use the following:
var t=0;

function Initialize()
{
var allImages = document.getElementsByTagName("img");

while (t < allImages.length)
{
allImages.item(t).onload = "StatusUpdate()";
t=t+1;
}
}

To automatically assign the StatusUpdate event to every image on the page but it doesn't work for some reason .

-NiCKEL

Top
#93826 - 15/05/2002 18:19 Re: Web authoring question. Don't hurt me! [Re: NiCKEL]
Phoenix42
veteran

Registered: 21/03/2002
Posts: 1424
Loc: MA but Irish born
Of course you now need to explain to us what the photos are of.

Top
#93827 - 16/05/2002 04:47 Re: Web authoring question. Don't hurt me! [Re: Phoenix42]
frog51
pooh-bah

Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
I've seen setups like that before. I'm sure the crop grown from them was a Dutch favourite

Of course I could be wrong
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock

Top
#93828 - 16/05/2002 06:06 Re: Web authoring question. Don't hurt me! [Re: frog51]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
I'm sure the crop grown from them was a Dutch favourite

You mean tulips, of course...
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#93829 - 16/05/2002 10:20 Re: Web authoring question. Don't hurt me! [Re: Phoenix42]
NiCKEL
journeyman

Registered: 27/02/2002
Posts: 59
Loc: Vancouver, BC, Canada
http://pernocto.com/
The pictures are from the Aquaponics -> Gallery.

Presently I am growing lettuce in it. I live in a third story appartment with no elevator so constructing an indoor aquaponics unit with 700 pounds of pea gravel was the 'easiest' way to grow food .

Top
#93830 - 16/05/2002 10:34 Re: Web authoring question. Don't hurt me! [Re: NiCKEL]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Presently I am growing lettuce in it.

ROFL, good one.
_________________________
Tony Fabris

Top
#93831 - 16/05/2002 12:36 Re: Web authoring question. Don't hurt me! [Re: tfabris]
Micman2b
addict

Registered: 27/12/2001
Posts: 441
Loc: Central, NC, USA
LOL...
_________________________
_____________
Sean in NC
130gb MK2a w/ 32mb ram
80gb MK2a empeg spare

Top