Ciao.

Sto provando questo script per mostrare un messaggio di attesa mentre si carica la pagina lato server.

Però ho due problemi:

1) Il messaggio ha una durata non apprezzabile sul browser
2) Al termine del caricamento della pagina lato server il messaggio rimane visibile.

Gradirei un aiuto, vi ringrazio molto.

codice:
<script type="text/javascript">
function getHTTPObject() {
if (typeof XMLHttpRequest != 'undefined') {
return new XMLHttpRequest();
}
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
return false;
}

var http = getHTTPObject();

function handleHttpResponse() {

if (http.readyState == 4) {
var temp = http.responseText;
document.getElementById("PHPDATA").innerHTML=temp;
}
}

function LoadData(){

var url = "default.asp";
http.open("GET", url, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
</script>


</head>

<body onload="javascript:LoadData()">

<div id="PHPDATA"> Please wait while the data is loading </div>