Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: OT: "preloading" html
From: Eric Dunham
Date: Thu, 23 Mar 2000 04:51:19 GMT

Just to clear a few things up...

#This actually sounds like poor HTML coding...I've never heard of a way to
#preload HTML pages (other than pages that have already been viewed and are
#stored in the cache).

No, it's not poor coding, it is a JavaScript "trick" that can be used to set
the visibility of the entire page to "true"
when the page loads.

#I think the pages you were viewing were missing many of the height and
width
#tags in images and/or tables. When the proper parameters are set, then the
#browser knows what space to reserve for the images and such so that it
#doesn't have to wait to download them all before displaying the text.
Without
#these parameters set, the browser has to download everything to figure out
#the page layout before it can start drawing it. There are some exceptions,
#but this is pretty much how it works.

That's all irrevelevant, it doesn't matter if you have the height and width,
etc. specified, the element will still download.
Granted, it's seen as better coding practice to define all attributes of an
element, but that wouldn't really affect the overall
visibility of an entire page because elements are still downloaded somewhat
"inline".

Now for the trick. Mind you that this is only version 4.x+ compatible, but
I'll show it to you nonetheless.
----------------------------------------------------------
<body
onLoad="(document.all)?mask.style.visibility='hidden':document.mask.visibili
ty='hide'>
<div id="mask">
<!-- preloading content goes here -->
</div>
<!-- the rest of your content goes here -->
</body>
----------------------------------------------------------
Now, up in the <style> section of your document you would have to define the
id 'mask' and give it some attributes.
I've found that position:absolute; left:0px; top:0px;
background-color:#000000; layer-background-color:#000000; width:103%;
height:100%; z-index:10
is a nice set to use, but feel free to use whatever you want. You may want
to hide just a portion of your document, like a Java menu or something (who
wants to see that plain gray square there while the applet loads anyway?),
or you may want to hide the whole thing. Either way, this should help you,
so feel free to experiment.
A couple of tips before you go...
1) IE will show an empty layer with the appropriate background color, etc.
NN won't.
2) NN will collapse the height/width of the layer to the largest element
inside it.
3) To be safe with both browsers, you might want to put a clear spacer gif
inside your "mask" layer that has the same dimensions as the layer to
prevent NN from collapsing it.
4) Read up on some of the stylesheets properties, etc.
(http://www.webmonkey.com) and also some of the ways to use JavaScript to
modify those properties when the element loads. You know, not just the body
tag has an onLoad event handler. Have you seen the sites that have images
with a 'wipe' effect on them. Or the images that slide onto the screen...?
http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm
5) If you get stuck on something, I'll be happy to answer any questions that
I have the ability to.
6) Friends don't let friends use FrontPage.

HTH,
Eric Dunham


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: OT: "preloading" html, Randy Kato

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]