Technical
Blinkable Tags For Internet Explorer

Even though blink considered to be very annoying feature, I had to implement some. My first experience was that super simple (text-decoration: blink) was not usable by IE and a tag of FF only. And as it happened I have lots of generic tags that may blink or not depending on the nature of data. So it was really hard for me to either encapsulate data in to blink tag or use ids for blinking. Following this blog
I copied function to get all of the elments by the class name “blink”. And then used function from another blog which describes how to do blinking in IE using js. Finally I comprised this two functions to blink based on the class name “blink”


<html>
<head>
<style type="text/css">
 /* This will work in ff and not ie */     
 .QStart{text-decoration:blink}    
</style>

<script type="text/javascript">

// I need this for IE since css blink does not work in IE
// however this js does not work FF
go_visibility = new Array;

function goblink()
    {

    if(document.getElementById && document.all)
        {
        blink_tab = getElementsByClassName("blink");
        for(a=0;a<blink_tab.length;a++)
            {
            if(go_visibility[a] != "visible")
                go_visibility[a] = "visible";
            else
                go_visibility[a] = "hidden";
            blink_tab[a].style.visibility=go_visibility[a];
            }
        }
    setTimeout("goblink()", 500);
    }

function getElementsByClassName(strClass, strTag, objContElm) {
  strTag = strTag || "*";
  objContElm = objContElm || document;    
  var objColl = objContElm.getElementsByTagName(strTag);
  if (!objColl.length &&  strTag == "*" &&  objContElm.all) objColl = objContElm.all;
  var arr = new Array();                              
  var delim = strClass.indexOf('|') != -1  ? '|' : ' ';   
  var arrClass = strClass.split(delim);    
  for (var i = 0, j = objColl.length; i < j; i++) {                         
    var arrObjClass = objColl[i].className.split(' ');   
    if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
    var c = 0;
    comparisonLoop:
    for (var k = 0, l = arrObjClass.length; k < l; k++) {
      for (var m = 0, n = arrClass.length; m < n; m++) {
        if (arrClass[m]  arrObjClass[k]) c++;
        if ((delim  ’|’ && c  1) || (delim  ’ ’ && c == arrClass.length)) {
          arr.push(objColl[i]); 
          break comparisonLoop;
        }
      }
    }
  }
  return arr; 
}

// To cover IE 5 Mac lack of the push method
Array.prototype.push = function(value) {this[this.length] = value; }

window.onload = goblink;

</script> </head>
<body>
</body>
</html>

blinkinSgcript