Hi,
I need to write a pure JavaScript function (no jQuery) that will:
1.
Wait for a DOC element to become visible.
Wait for the same element to then become invisible.
Here is my current attempt:
var checkVisible = setInterval(function() {
var el = document.getElementById(‘submitBusy’);
var style = window.getComputedStyle(el);
/* See if element is visible. */
if (style.display !== ‘none’) {
clearInterval(checkVisible);
var checkInvisible = setInterval(function() {
var el = document.getElementById(‘submitBusy’);
var style = window.getComputedStyle(el);
/* See if element is visible. */
if (style.display === ‘none’) {
clearInterval(checkInvisible);
}
}, 50);
}
}, 50);
On the page, when a certain button is clicked to load a table on the page, the following function is called:
function searchStart() {
$(“#submitBusy”).css(“display”, “inline-block”);
}
once the page’s contents are pulled from the server, the following is called:
function searchDone() {
$(“#submitBusy”).css(“display”, “none”);
}
Once the “submitBusy” element is shown and then disappears, I then want to walk through all rows in the newly generated table so I need to know where to put that code.
Thanks for your help.