not show a page till is loaded

liunx

Guest
Hi! I don't want a page to be shown until all the elements of it are loaded. The web page I'm working on has many frames an it's really awful that the frames appear in complete disorder, and as there're images in some frames, some are shown a few seconds later than those without an image.<br />
<br />
Thanks!!!<!--content-->you have no control over the way it loads. everybody has a different connection and some are very fast as others are very slow. the browser will load what it gets in no particulure order. the only thing you can do is preload the images for the next page.<!--content-->You could place the whole page within a single element like a span. If you set this element's visibility attribute to hidden then you won't be able to see it, or you could set the display attribute to none.<br />
<br />
When the page loads you can use the onload event handler to call a javascript function to set the display or visibility attributes to another value.<br />
<br />
I would use the display attribute over the visibility one out of preference.<br />
<br />
For values to use take a look at the msdn.<br />
<br />
Hope it works<br />
<br />
Russell<!--content-->then that will be misleading as on slow connections it will appear that the page is done but all white. not very good if you want the user to stay. they stay as long as they see things load.<!--content-->it's not overly difficult to put a "loading" image on the screen that becomes invisisble after the page has completed being Download <!--more-->ed.<!--content-->and remember that when you do onload it comes up first so no, that way won't work either. you can't tell when the page is fully done to swith it back.<!--content-->ok, thanks to everybody, I did what Russell said, and there's no problem because it takes the whole page a few seconds to load, so I don't think users will go away because they don't really have to wait.<br />
<br />
bye!<!--content-->
 
Back
Top