473,465 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How Do I Keep a Page from Appearing Until Completely Built?

I have a page that uses divisions, tables, iframes, and forms, and is
partially built using javascript. As it loads parts of the page appear
in odd places and move as other parts are built. How can I keep the
page from appearing until it is completely built?

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #1
1 1120
On Thu, 12 Feb 2004 06:58:45 -0800, Dennis M. Marks
<de******@domain.invalid> wrote:
I have a page that uses divisions, tables, iframes, and forms, and is
partially built using javascript. As it loads parts of the page appear
in odd places and move as other parts are built. How can I keep the
page from appearing until it is completely built?


You shouldn't, really.

I'm used to seeing pages gradually build and reshape due to my dial-up
connection. It really isn't something that users will dislike.

If you really want to do this, give the BODY an ID and place this at the
end of the HEAD block (changing 'bodyID' as appropriate):

<script type="text/javascript">
function getObjectRef( id ) {
if( document.getElementById ) {
return document.getElementById( id );
} else if( document.all ) {
return document.all[ id ];
}
return null;
}

function hideDocument() {
var bodyRef = getObjectRef( 'bodyID' );

if( bodyRef && bodyRef.style &&
'string' == typeof bodyRef.style.display ) {
bodyRef.style.display = 'none';
}
}

function showDocument() {
var bodyRef = getObjectRef( 'bodyID' );

if( bodyRef && bodyRef.style &&
'string' == typeof bodyRef.style.display ) {
bodyRef.style.display = 'block';
}
}
</script>

....place this at the very beginning of the BODY block:

<script type="text/javascript">
hideDocument();
</script>

....and call showDocument() onload.

However, bear in mind that users might be confused why your page is empty
if it takes too long to load.

Mike
The code above has been tested on Opera 7.23, IE 6, Mozilla 1.6 and
Netscape 7.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2

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

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
4
by: et | last post by:
I have made no changes to my website, but have simply replaced images with new images of the same name, and they are part of a hyperlink. Even though I have done a rebuild over and over, it still...
3
by: jonathan.beckett | last post by:
I have been experimenting with placing user controls (using Windows Forms controls) into an ASP.NET webpage - and am completely stuck. I can get a blank user control to work, but nothing beyond...
11
by: Bazza Formez | last post by:
Hi, I have an app which utilizes forms security. I have a Login.aspx page which references my MasterPage.master. The master page in turn references a css. In the designer of VS 2005, the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.