javascript thread: onfoucus and onclick events
Hi Arsalan,
you could just make sure, that closingOption can not be entered twice.
What about:
var inClosingOption= false;
function closingOption() {
if (inClosingOption) return;
inClosingOption= true;
// try {
if (window.confirm("close window?")) {
// do something
} else {
// do something
}
// } finally {
inClosingOption= false;
// }
}
The try { } finally { } clause is not necessary, but it helpes to make the
code airtight.
regards,
Volker
|





