Solved

Blink Text

Posted on 1999-01-23
4
346 Views
Last Modified: 2010-05-18
How can make the text is blink in ie4?
0
Comment
Question by:a_sameer
  • 2
4 Comments
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1280061
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
 

Author Comment

by:a_sameer
ID: 1280062
What can i do with DHTML ?
0
 
LVL 4

Accepted Solution

by:
nax earned 50 total points
ID: 1280063
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
 
LVL 4

Expert Comment

by:nax
ID: 1280064
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question