I have a flash object that takes up the whole browser on my website. I am trying to detect if the browser is in focus or not. What is the best way to do this? Using onfocus / onblur works in FireFox, but not in IE6 or IE7.
window.onblur = function() {
document.title = "NOT focused";
}
window.onfocus = function() {
document.title = "focused"
}
If I remove the flash object, it looks like this will work in IE6/7 also, but that is not an option for me. Thanks!