ok...here' s how you do it.
First of all you have to be using something other than straight HTML...like ASP or JSP. This is because you are going to have to send part of the page, flush the buffer and then send the rest.
Near the top of your page, you print out a span that contains your loading message. In my case this will also contain some kind of animated gif to let the user know that " work" is going on.
<span id=" spnLoading" style=" display:inline;" >Loading...please wait</span>
The id attribute of this span is critical as we will use it below.
Then in between the head tags of the page you put some javascript code that will execute when the page loads.
<head>
<script language=" javascript" >
function hideLoadingMessage(){
document.getElementById(' spnLoading' ).style.display = " none" ;
}
</script>
</head>
Then, you have to modify your body tag to call the function when the page loads.
<body topmargin=" 0" leftmargin=" 0" onload=" hideLoadingMessage()" >
If you do this, the span will go away once the page is loaded.
As I said before though, you have to use this in an ASP or JSP page. This is because on the line after the <span> tag, you will have to flush the buffer to send everything to the client while the server is building the rest.
With ASP you do this by inserting this line:
<% Response.flush() %>
With JSP it is something like:
<% response.flushBuffer(); %>
I' m pretty new to JSP...so I' m not exactly sure...
This will allow the user to see that something is being done and will keep them from clicking on anything until the page is done.