Forum Moderators: open
Some program can flash (blink) the title in the task bar (like Yahoo Messenger: flash it's title when new message arrive), so how can I use JavaScript to make the title of the browser flash? Is it possible?
Thanks for your help :)
I am not sure if this is what you are looking for, but here is a script that changes the title after every set time. I have set it up below, in order for it to seem like it is blinking:
------------------------------------------------------
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function settitle() {
var a = "Welcome to Acme Block Building";
var b = "";
var c = "Welcome to Acme Block Building";
var t = new Date();
s = t.getSeconds();
if (s == 2) {
document.title = a;}
else if (s == 20) {
document.title = b;}
else if (s == 30) {
document.title = c;}
else if (s == 40) {
document.title = a;}
else if (s == 50) {
document.title = b;}
else if (s == 00) {
document.title = c;}
setTimeout("settitle()", 1000);
}
// End -->
</script>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY onLoad="settitle()">
------------------------------------------------------
I hope this helps, and good luck!
(I got this script off of javascript source)