11 Years
Discussion Span
Last Post by MattEvans

hmm.. you could try this approach:

have the page load up with the <body> element either disabled or un-visible, specified in the element's inline "style" attribute. i.e.

<body style="visibility:hidden;">..

at the end of the javascript file that you want to be loaded; add the line

document.onload = function() { document.body.style.visibility = "visible";};

You might even get away with just putting

this.style.visibility = 'visible';

into the body onload attribute directly; because onload shouldn't be called until the page is infact loaded.

you may need to put the page content inside another container object (<div>) if you find that visibility doesn't work on the body element.. display:none; is another way to turn of visibility; to undo that, set display to nothing ( ..style.display = ""; )

erm; also, the page wont show atall unless a script is linked that turns it's visibility back on.. so, think carefully about non-JS users who still have CSS =P

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.