Page loading hack

Posted on Friday, October 27, 2006 11:51 AM by K. Latham
I'm just playing around with this, but it looks like it actually works.

Right under the <BODY... I added this ASP script:

Response.Write "<DIV ID=loader STYLE=""text-align:center;padding:50;color:#ffffff;""><IMG SRC=""/Img/ajax-loader.gif"" ALIGN=absmiddle border=0 /><BR />the pages are loading<br />please stand by</DIV>"
Response.Write "<DIV ID=wholepage STYLE=""display:none;"">"

Right above the </BODY> I added this ASP script:

Response.Write "<SCRIPT LAUNGUAGE=Javascript>"
Response.Write " = ""none"";"
Response.Write " = ""block"";"
Response.Write "</SCRIPT>"

I'll probably remove this later, but it sure beats looking at a blank loading screen. Of course this tells me I need to rethink my page design a bit. Well that's another tale for another time.

Oh I got the loading graphic from here: