G
Grant Merwitz
Hi
I have a form that submits to a web service.
As this takes time, i would like to show the user a loading message while
its loading.
I am using XmlHttp to do the request
How can i show this waiting message.
No matter what i do, it waits till everythings loaded before doing anything.
Currently:
<SCRIPT language="javascription">
function ButtonClick()
{
ShowLoadingMessage();
SubmitXmlHttpRequest();
}
function ShowLoadingMessage()
{
document.getElementById('statusmessage').innerHTML = 'Loading ...';
}
var xhttp;
function SubmitXmlHttpRequest()
{
xhttp = new ActiveXObject("Msxml2.XMLHTTP");
xhttp.onreadystatechange = GetXmlHttpResult;
xhttp.open("GET", http://mydomain.com/WebPageThatDoesProcessing,
false);
xhttp.send();
}
function GetXmlHttpResult()
{
if ( xhttp.readyState == 4 )
document.getElementById('statusmessage').innerHTML = 'Submitted';
}
</SCRIPT>
TIA
I have a form that submits to a web service.
As this takes time, i would like to show the user a loading message while
its loading.
I am using XmlHttp to do the request
How can i show this waiting message.
No matter what i do, it waits till everythings loaded before doing anything.
Currently:
<SCRIPT language="javascription">
function ButtonClick()
{
ShowLoadingMessage();
SubmitXmlHttpRequest();
}
function ShowLoadingMessage()
{
document.getElementById('statusmessage').innerHTML = 'Loading ...';
}
var xhttp;
function SubmitXmlHttpRequest()
{
xhttp = new ActiveXObject("Msxml2.XMLHTTP");
xhttp.onreadystatechange = GetXmlHttpResult;
xhttp.open("GET", http://mydomain.com/WebPageThatDoesProcessing,
false);
xhttp.send();
}
function GetXmlHttpResult()
{
if ( xhttp.readyState == 4 )
document.getElementById('statusmessage').innerHTML = 'Submitted';
}
</SCRIPT>
TIA