Solved

Blink Text

Posted on 1999-01-23
4
345 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

772 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