Re[5]: Hide Dropdown menu - Handle mouseover events on menu item
2005/08/03 09:13
Viewed 12556 times
Replies: 0/0

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.

Google