Solved

Blink Text

Posted on 1999-01-23
4
343 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
Comment Utility
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
Comment Utility
What can i do with DHTML ?
0
 
LVL 4

Accepted Solution

by:
nax earned 50 total points
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now