Reputation: 7568
Just AS a chat (yahoomessenger, msn .....) WHEN we get a new message, the corresponding window is flashing
or AS in internet explorer WHEN we finsh downloading something the corresponding window is flashing in the toolbar
How to do it with a popup?
Upvotes: 1
Views: 97
Reputation: 32082
That's not accessible from JavaScript in a web page. You could, however, change the title bar to a string such as "!!!!!!!!!!!!!!!!" and back again for a similar effect.
Example code (live at http://jsbin.com/ifewu3/2):
var oldTitle = '', titleBlanked = false, flashInterval;
flashInterval = setInterval(function () {
if(!titleBlanked) {
oldTitle = document.title;
document.title = '!!!!!!!!!!!!!!!!';
titleBlanked = true;
} else {
document.title = oldTitle;
titleBlanked = false;
}
}, 500);
Then call clearInterval(flashInterval)
when you want to stop the flashing.
Upvotes: 0
Reputation: 63126
You can use the following javascript to trigger this.
window.focus();
Upvotes: 2