- Log in to post comments
Ok- tried it and still no luck.
I have changed the code so It is doing the following and now it seems to work.
ClientMethod displayResults() [ Language = javascript ]
{
document.getElementById("loading").style.display = "block"; // show loader image
zenPage.getComponentById('tblResults').setHidden(true); // hide the table
setTimeout(function(){zenPage.displayData();}, 1000); // run test and populate table in a second
}
ClientMethod displayData() [ Language = javascript ]
{
// wait for the function to respond with the message before proceeding further
zenSynchronousMode = 1;
var getResults = zenPage.CallRunTestMethod();// call the method to run test
if (getResults == ""){
var table = zenPage.getComponentById('tblResults');
table.setHidden(false);
table.executeQuery();// execute the query and show the results
zenSynchronousMode = 0;
document.getElementById("loading").style.display = "none"; // hide the loader.
}
else
{
alert("Test Failed: error returned " + getResults + ". Please click on run test button again to repeat test.");
zenPage.getComponentById('tblResults').setHidden(true); // hide the table
document.getElementById("loading").style.display = "none"; // hide the loader
}
}
}
- Log in to post comments
thank you for looking into it. David.