N
Nicolas R
Hi all,
Im trying to figure out how to display a 'loading' message when
scripts are being executed, ie when the page is still not ready for
interaction. This is for a web app which relies on javascript to
insert dom elements and do stuff, so the user must know when
everything is ready to interact with.
I tried using an interval which checks for a specific variable
(page_loading) and when its set to false then the 'loading' message is
removed (its appended on page load). This requires that I set the
variable to true at the start of each of my functions (at least the
most time consuming ones) and setting it to false at the end. Even so,
its not very reliable and its not a pretty solution.
Is there a way to set an interval which checks whether or not a
function is currently being executed, or something similar?
Has anyone figured this out?
Cheers
Im trying to figure out how to display a 'loading' message when
scripts are being executed, ie when the page is still not ready for
interaction. This is for a web app which relies on javascript to
insert dom elements and do stuff, so the user must know when
everything is ready to interact with.
I tried using an interval which checks for a specific variable
(page_loading) and when its set to false then the 'loading' message is
removed (its appended on page load). This requires that I set the
variable to true at the start of each of my functions (at least the
most time consuming ones) and setting it to false at the end. Even so,
its not very reliable and its not a pretty solution.
Is there a way to set an interval which checks whether or not a
function is currently being executed, or something similar?
Has anyone figured this out?
Cheers