Important alert: (current site time 7/15/2013 1:09:42 PM EDT)
 

VB icon

Blinking Text 2.0

Email
Submitted on: 6/14/2002 10:18:37 AM
By: Premshree Pillai  
Level: Intermediate
User Rating: By 1 Users
Compatibility: JavaScript
Views: 45329
 
     This script is a simple script that blinks a text like the one shown above.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Blinking Text 2.0
' Description:This script is a simple script that blinks a text like the one shown above.
' By: Premshree Pillai
'
' Assumes:This script is a simple script that blinks a text like the one shown above. 
This version (v 2.0) supports IE, Netscape 4.x and Netscape 6.x. 
The blinking speed can be adjusted by the variable blink_speed. (Here 1000, which means that the text will blink every 1000 milliseconds, i.e a blink speed of 1 blinks/second.) 
You cannot change the blink speed for Netscape 4.x.
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2984&lngWId=14'for details.'**************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Blinking Text 2.0</title>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:20pt; color:#003399; font-weight:bold}
</style>
</head>
<body bgcolor="#FFFFFF">
<center>
<span class="header">Blinking Text 2.0</span>
<br><br>
<!--BEGIN QIKSEARCH BLINKING TEXT 2.0-->
<script language="javascript">
// Location of this script:
// http://www.qiksearch.com/javascripts/blinking_text20.htm
//*********************************************
//* Blinking Text 2.0 *
//* Blinks a text *
//* v 2.0 works on IE/NS4/NS6 *
//* Modified 07 May 2002 *
//* (c) Premshree Pillai, *
//* http://www.qiksearch.com *
//* E-mail : premshree@hotmail.com*
//* Use the script freely as long as this *
//* message is intact *
//*********************************************
window.onerror = null;
 var IE4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
 var NS4=document.layers;
 var NS6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;
 var blink_speed=1000; // Delay in milliseconds
 var i=0;
 var left_pos=330; // The Distance of text from left
 
if (IE4) 
{
 layerRef="document.all";
 styleSwitch=".style";
}
//BLINKING
function Blink(layerName)
{
 if (IE4)
 { 
 if(i%2==0)
 {
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="visible"');
 }
 else
 {
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="hidden"');
 }
 }
 
 if(NS6 && (navigator.appName!="Microsoft Internet Explorer"))
 {
 if(i%2==0)
 {
eval('document.getElementById("' + layerName + '").style.display=""');
 }
 else
 {
eval('document.getElementById("' + layerName + '").style.display="none"');
 }
 }
 if(i<1)
 {
 i++;
 } 
 else
 {
 i--
 }
 setTimeout("Blink('"+layerName+"')",blink_speed);
}
if(IE4||NS6)
{
 if(IE4)
 {
 dispIENS="visibility:hidden;";
 }
 else
 {
 dispIENS="display:none;";
 }
 document.write('<div id="qiksearch" style="position:absolute; left:' + left_pos + ';' + dispIENS + '"><font face="verdana,arial,helvetica" color="#FF0000"><b>Blinking Text!</b></font></div>');
 Blink('qiksearch');
}
if(NS4)
{
 document.write('<blink><font face="verdana,arial,helvetica" color="#FF0000"><b>Blinking Text!</b></font></blink>');
}
</script>
<!--END QIKSEARCH BLINKING TEXT 2.0-->
<table align="center" width="400"><tr><td>
<br>
<font face="verdana,arial,helvetica" size="-1" color="#000000">
This script is a simple script that blinks a text like the one shown above.
<br><br>This version (v 2.0) supports IE, Netscape 4.x and Netscape 6.x.
<br><br>The blinking speed can be adjusted by the variable <font face="courier">blink_speed</font>. (Here 1000, which means that the text will blink every 1000 milliseconds, i.e a blink speed of 1 blinks/second.)
<br><br>You cannot change the blink speed for Netscape 4.x.
</font>
</td></tr></table>
<br>
<center><a href="mailto:premshree@hotmail.com" class="link">© 2002 Premshree Pillai</a></center>
<br>
<center><a href="http://www.qiksearch.com/javascripts/blinking_text20.htm"><font face="arial,verdana,helvetica" size="-2" color="#CCCCCC">http://www.qiksearch.com/javascripts/blinking_text20.htm</font></a></center>
</body>
</html>


Other 28 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/28/2004 3:54:35 PM

Hi Premshree
Thank you for sharing your code with us. I am in fact looking for a random blink of several words each in a separate layer, a little like the stars in the sky. Any suggestions?
Kind regards
Guy
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.