The following sample of code gives an idea of how to add a blinking flash message at the status bar. Adding flash text at the status is very simple for that we use a single if-else loop in function blinkflash().
First of all we define three variables message for ‘display message at status bar’, speed for ‘set time interval to flash text’, and status and assign status=1. In the if-else loop we check the condition if (status == 1) and display message at status bar by window.status=message; and make status=0; when setTimeout("blinkflash();",speed); call function blinkflash() here the else condition is satisfied and window.status=""; display blank at status bar and set status=1; The above process is done with the interval of only 500 milliseconds so we feel that message is flashing at the status bar.
<SCRIPT language=JavaScript type="text/javascript">
var message = "My Flash message...!!!";
var speed = 500;
var control = 1;
function blinkflash()
{
if (control == 1)
{
window.status=message;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("blinkflash();",speed);
}
blinkflash();
</SCRIPT>