H
Hoss
Hello all,
Ill try and make this short and sweet. I have the following Javascript
being executed when the user clicks a button
function myFunc()
{
-- Get some values from elements on the page
-- Send those values to the server using Ajax and retrieve a
DataTable.
-- Render the Datatable on the page for the user to view
}
This works wonderfully, except when im trying to retrieve a large
dataset (after, say 100 rows it begins to slow down. Under certain
circumstances I need to retrieve 500+). Now, im already working on
speeding up this process, but there is always going to be some waiting
if your asking for a ton of data. What im wanting to do is display a
message on the screen saying "Searching ... " and then change it to
"Complete .. " When im finished rendering the table to the screen. So I
made the following modifications
function myFunc()
{
document.getElementById("message").innerHTML = "Searching...";
-- Get some values from elements on the page
-- Send those values to the server using Ajax and retrieve a
DataTable.
-- Render the Datatable on the page for the user to view
document.getElementById("message").innerHTML = "Search
Complete.";
}
The "message" element is simply a <span>.
Problem is neither of those messages are being displayed until the
entire function is done.
I need to be able to display the first message right off, before
proceeding with the rest of the operation.
Any help greatly appreciated.
Ill try and make this short and sweet. I have the following Javascript
being executed when the user clicks a button
function myFunc()
{
-- Get some values from elements on the page
-- Send those values to the server using Ajax and retrieve a
DataTable.
-- Render the Datatable on the page for the user to view
}
This works wonderfully, except when im trying to retrieve a large
dataset (after, say 100 rows it begins to slow down. Under certain
circumstances I need to retrieve 500+). Now, im already working on
speeding up this process, but there is always going to be some waiting
if your asking for a ton of data. What im wanting to do is display a
message on the screen saying "Searching ... " and then change it to
"Complete .. " When im finished rendering the table to the screen. So I
made the following modifications
function myFunc()
{
document.getElementById("message").innerHTML = "Searching...";
-- Get some values from elements on the page
-- Send those values to the server using Ajax and retrieve a
DataTable.
-- Render the Datatable on the page for the user to view
document.getElementById("message").innerHTML = "Search
Complete.";
}
The "message" element is simply a <span>.
Problem is neither of those messages are being displayed until the
entire function is done.
I need to be able to display the first message right off, before
proceeding with the rest of the operation.
Any help greatly appreciated.