Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prashant on Jun 03, 2009 22:48
open dhtmlx forum
dhtmlxAjax POST

Is it possible to show a "processing running" or "page loading" indicator (gif, or any such thing) while waiting for a response from the server using dhtmlxAjax POST method???? My outputResponse code is as follows:

function outputResponse(loader)
{
if(loader.xmlDoc.responseText!=null)
{
if(loader.xmlDoc.responseText == "TRUE")
{
parent.myLayout.cells("b").collapse();
parent.myLayout.cells("c").setText("Results");
parent.myLayout.cells("c").attachURL("bendRes.html");
}
else
{
alert("Error executing script!!");
}
}
}
Answer posted by Support on Jun 04, 2009 02:38
You can show any kind of "running" message exactly before executing post request and hide it inside callback code


show_message();
dhtmlxAjax.post(url,parameters,function(loader){ 
        hide_message();
        ... any kind of custom code...
});

Beware that it not possible to show anything for getSync and postSync types of requests.