Topic: Display message which blinks for few seconds

Hi all,

How to display error messages on the top which blinks for few seconds only. Is there any javascripts  available for this.

Thanks in advance

Re: Display message which blinks for few seconds

Sure...

c=0;
function blink_notice() {
  var obj= document.getElementById('notice');
 
  if (obj.style.visibility == "visible") {
    obj.style.visibility = "hidden";
  } else {
    obj.style.visibility = "visible";
  }
  if (c < 10) { // blink for 5 secs (10x500ms=10sec).
    setTimeout('blink_notice()', 500); // blink every 1/2 sec.
    c++;
  }
}

Then just put your text inside a tag with an ID of 'notice.'