[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Blink Text

How can make the text is blink in ie4?
0
a_sameer
Asked:
a_sameer
  • 2
1 Solution
 
Christian_WenzCommented:
the <BLINK> tag only works with Netscape.
Using IE, you can use a DHTML solution: with timeouts, you periodically set the color of the text to either text color or the background color. However, I personally would refrain from using such effects, to me, they look quite annoying.
0
 
a_sameerAuthor Commented:
What can i do with DHTML ?
0
 
naxCommented:
If you don't want to use DHTML, you can use javascript like this one. First put the text in a layer.

<div id = "text1" style = "position:absolute; visibility:hidden">Put your flashing text here using the old fashion way</div>

Then, before the </body> put this:

<script language="javascript">
<!--
delay = 500;

function blink(layer) {
     vis = layer.style.visibility;
     if (vis == "visible") vis = "hidden";
     else vis = "visible";
     layer.style.visibility = vis;
     tstring = "blink(\""+layer+"\")";
     setTimeout(tstring, delay);
     }

setTimeout("blink('text1')", 500);

//-->
</script>

you can control the speed of blinking by changing the value of delay (in milliseconds).

good luck!
0
 
naxCommented:
oops, i made a mistake!

please change all the function blink(layer) part to
     
function blink(layer) {
     vis = document.all[layer].style.visibility;
     if (vis == "visible") vis = "hidden";
     else vis = "visible";
     document.all[layer].style.visibility = vis;
     tstring = "blink(\""+layer+"\")";
     setTimeout(tstring, delay);
     }

this function can also be used to blink any other layer, just change the argument of blink to the name of the layer.

regards,
nax
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now