Discuss How to interrupt a queue? in the JavaScript Development forum on Dev Shed. How to interrupt a queue? JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
But the application may have to display another message before the
30 seconds has elapsed. How can I interrupt the queue to cause the
new message to display before the 30 seconds has elapsed?
Posts: 49
Time spent in forums: 17 h 27 m 23 sec
Reputation Power: 1
Thank you web_loone08 for showing me the setTimeout() function. I was able to use it [along with the clearTimeout() function] to create a function that does exactly what I wanted. This is the tested version of this function.
javascript Code:
Original
- javascript Code
var BD18 = {};
BD18.noteTimeout = null;
/* Function doLogNote displays a lognote for 30 seconds.
* A new lognote will replace any previous log note
* that has not yet timed out. BD18.noteTimeout is a