Oh, not like this! :-) The "setTimeout" call in JavaScript doesn't introduce a delay--it only delays code execution. That's a bit different. Modify your function like this:
function _doShowModal() {
window.showModalDialog(strURL, "", strOptions);
}
function showModal() {
setTimeout(_doShowModal, 200);
}What happens now is that your click handler will setup the _doShowModal function to execute 200 milliseconds after the item was clicked; that's plenty of time for the popups to go away. Feel free to try a smaller value, such as 50ms.
Please let me know if that solved the problem.