I am running a database query through javascript, and I want to display a message "Query is running" while the query statement is getting executed. But the message isn't getting displayed till the time the entire query is run. What would be the way to do this in javascript. I am a javascript beginner and self-learner, and i was unable to figure out away to do this. I googled but couldn't find anything useful. My code is:
function runThisQuery() {
var connection = new ActiveXObject("ADODB.Connection");
var rs = new ActiveXObject("ADODB.Recordset");
var connectionstring="Provider=SQLOLEDB;Data Source=server;Initial Catalog=DB;Integrated Security=SSPI";
connection.Open(connectionstring);
//code till here is fine
var dummyCell = document.createElement('td');
dummyCell.setAttribute('id','dummyCell');
var dummyCellText = document.createTextNode("running query");
dummyCell.appendChild(dummyCellText);
document.getElementById("mismatchSummaryRow").appendChild(dummyCell);
rs.Open(runThisQuery, connection); //step A
}
The table cell that I am creating above, gets displayed only after the entire query (step A) is run. I want to display the message before the entire query (in Step A) is executed. what is the way to do this in JavaScript?