[Pro] Is there an 'action' for page load

Is there an action to attache to the page to stall the page opening until all the elements are loaded. I have seen it in action obviously but not sure how its done.

beautiful day is it not…whilst i’m stuck in my hole!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have seen it in action obviously but not sure how its done.

Are you sure? Do you have a link to an example?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Have a look at this thread;
http://www.freewaytalk.net/thread/view/30971

Regards,
Tim.

On 23 Apr 2010, at 13:32, anton wrote:

Is there an action to attache to the page to stall the page opening
until all the elements are loaded. I have seen it in action
obviously but not sure how its done.

beautiful day is it not…whilst i’m stuck in my hole!

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tim - I assume that if Javascript is not enabled then there is no obvious difference doing it that way?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Dave,
Absolutely. What this does is to hide the PageDiv element until the
page has fully loaded. As long as the CSS style to hide the div
initially is added with JavaScript then users without JS switched on
will just see the page loading as normal. With JS on the page content
is hidden and as soon as the body onload event fires, boom (as Steve
would say), and the page just snaps into place.

If anything this makes the page load a bit slower as it has to also
load the scrip and any message while the main page is loading in the
background. The value is in the perceived loading speed while the user
looks at a pretty loading message or similar.

I seem to recall an action for this as well. I’ll have a dig around
and see if I can find it.

Regards,
Tim.

On 23 Apr 2010, at 18:47, DeltaDave wrote:

Tim - I assume that if Javascript is not enabled then there is no
obvious difference doing it that way?

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The value is in the perceived loading speed while the user looks at a pretty loading message or similar.

And how would you create a ‘pretty loading message’ so that the viewer doesn’t think your page is bust and bu**er off never to return.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

One of the easiest ways to manage this is to put your message on the page background. Cover it with any other part of your design, and it will be hidden when the page loads and the JavaScript pops the visibility on the PageDiv.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So the page background is not contained within the PageDiv. Does that apply to a background image as well?

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It only applies to the background image applied to the body. You can also apply a background to any other element on the page. But in Freeway, all elements that you can see on the page are “children” of the PageDiv, so if you hide that, all it’s children will hide as well, thus revealing the body.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So to summarise: if I select a Page Background Colour and/or image (Page Inspector with nothing on the Page selected - Page Appearance settings) these styles are declared in the Body but outwith the PageDiv. Just want to clarify this for other readers of the thread.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Exactly right. Think of it as a layer cake. In code, it looks like this:

body
	PageDiv
		item1
		item2
		...

If you were stacking up layers of cake (or maybe transparent
cellophane) you would see this:

		item2
		item1
	PageDiv
body

In a default Freeway CSS layout, you would see that each thing you
draw (item1,2, etc.) is alone on a page-sized imaginary layer,
separated from all other layers by the Z-axis (height). They are
children (code-wise) of the PageDiv, and inherit their positioning
from that master layer. But they each “believe” they are alone in the
universe. (They aren’t capable of much imagination, since they’re only
2-dimensional creatures. Read Flatland for more on this topic.)

Once you start creating an inline layout, things get a bit more
complex than this, with elements occupying the same Z-index (which is,
by the way, the thing that allows them to push each other out of the
way when their text contents grow). But in a normal “just draw stuff”
Freeway layout, you always end up with this structure.

In HTML, every element can have a background (image and/or color).
This appears behind each element’s children, so if you were to style a
paragraph with a background, that background would sit behind the
characters of text in that paragraph, and would sit above the
background of the DIV that contained the paragraph (it’s parent
element, whatever that is).

The PageDiv is the master element drawn by Freeway, and you can’t
influence it much at all, style-wise. You can give it a width, by
setting alignment on your page to something other than None, and you
can set its margin to Auto by setting your page to Align: center. But
that’s about it, without resorting to Actions.

When you style the page in the Inspector, you are adding style
attributes to the body tag, which sits behind the PageDiv in the
stacking order. So back to our cake analogy, the body tag would really
be more like the dining table that you serve your cake on. The PageDiv
could then be the plate, and the various things you draw would be the
layers of cake.

Walter

PS: One other helpful thing that I’m reminded of. Each element that
has a background can have two layers to that background. If you set a
background image and a color background color, the image will
naturally be fixed dimension, the color will expand to fill any size
of element, and the color will sit “behind” the image. So you could
use a small background image (set not to tile) above a background
color to create a two-tone background.

On Apr 24, 2010, at 10:07 AM, DeltaDave wrote:

So to summarise: if I select a Page Background Colour and/or image
(Page Inspector with nothing on the Page selected - Page Appearance
settings) these styles are declared in the Body but outwith the
PageDiv. Just want to clarify this for other readers of the thread.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As always Walter a great explanation.

This will be helpful to others to clarify the structure of an HTML page.

Thanks

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options