Spectacular Free Slide Show
MP3 Sound Streamer
Email Link Encoder
Stream Website Audio
Cool Free Text Scroller
CodeLifter.com
S
oftware & S
cripts by CodeBrain.com
Home
JavaScripts
PopUp Maker
-
po
pup wind
ows
CodeLifter 5
-
source viewer
ScrollBar Styler
-
color scrol
lbars
Flash Fixer
-
rem
ove al
erts
Roll-Over Maker
-
image roll-overs
Link Cloaker 5
-
enc
rypt links
Site Capture 3
-
hidden frames
CHMOD 2 Utility
-
chmod utility
BlackBird 3.0
-
browser shell
Zoom 1.0
-
magnifier
MicroTicker.com
-
text scroller
CodeBrain.com
-
j
ava app
lets
D3Q.com
-
xp icon control
BrainCode.com
-
j
ava app
lets
MailToProtector
-
protect email
Java Applets
Perl Scripts
Affiliate Program
Index
TriState Rainbow Link Script
With Optional On/Off Calls
Index
Click Here
off
on
Click
here
to select the code in the window below.
Use Ctrl+C to copy it to your clipboard.
============================================================ Script: TriState Rainbow Link Script Functions: Creates a link that blinks through three colors - settable blink rate with rate variable - settable blink colors, settable no-blink color - on/off control via links (optional) - can be made to start blinking when clicked - can be made to stop blinking when clicked Browsers: NS6 and IE 4.0&up; degrades gracefully in NS3,4 Author: etLux ============================================================ Step 1. Put the following script in the head of your page: <script> // ========================== // (C) 2000 by CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // blink speed in miliseconds var rate = 500; // the three blink colors var Color1 = "#FF0000" var Color2 = "#00FF00" var Color3 = "#8080FF" // the color if/when turned off (no-blink color) var ColorX = "#FFFF00" // set this to true for auto start; else, false var DoIt = true // do not edit below this line // --------------------------- bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" ok = false var i=0; function doTriStateRainbowLink(){ ok = true if ((bNS && bV >= 5) || (bIE && bV >= 4)){ i++; if (i==1) C = Color1 if (i==2) C = Color2 if (i==3) C = Color3 if (!DoIt) C = ColorX if (bIE) BlinkLink.style.color=C if (bNS) document.getElementById('BlinkLink').style.color = C if (i > 2) i = 0 if (DoIt) timer=setTimeout('doTriStateRainbowLink()', rate) } } function doOnOff(a){ if (ok){ if (a =="off") {DoIt = false} if ((a =="on")&&(!DoIt)) { DoIt = true doTriStateRainbowLink() } } } </script> ============================================================ Step 2. Put the following call in the body tag, as shown: <body onLoad="doTriStateRainbowLink()"> ============================================================ Step 3. Put one of the following link formats in your page; changing only the url (and target if desired) IMPORTANT You can have only ONE link on the page with id="BlinkLink" and name="BlinkLink". More than one may crash the script. Therefore, use only ONE of the following FORMATS. FORMAT 1 - Automatic blinking, constant Set var DoIt in the script to true <a name="BlinkLink" id="BlinkLink" href="http://codebelly.com" target="_blank">Click Here FORMAT 2 - Link stops blinking when clicked Set var DoIt in the script to true <a name="BlinkLink" id="BlinkLink" onClick="doOnOff('off')" href="http://codebelly.com" target="_blank">Click Here FORMAT 3 - Link starts blinking when clicked Set DoIt var in script to false <a name="BlinkLink" id="BlinkLink" onClick="doOnOff('on')" href="http://codebelly.com" target="_blank">Click Here ============================================================ Step 4. (Optional) BLINK CONTROL VIA LINKS On/Off control switches via links would look as below, and can be used with any of the above FORMATS <a href="javascript:doOnOff('off')">off <a href="javascript:doOnOff('on')">on ============================================================
Get The Code!
CodeLifter is a
CodeBrain.com
Sister Site
© 1995-2008 OEC Corp & CodeLifter.com
CodeLifter™ & CodeBrain™
Legal Notices
CodeBrain InterNET Group
BrainCode.com
CodeFoot.com
CodeBelly.com
D3Q.com
etLux.com
FFFast.com
IEFix.com
PopUpWorks.com
MicroTicker.com
DavidSosnowski.com
OECCorp.com
MailToProtector.com
CodeBrain.com
Free MP3
Downloads
Contemporary classical music, completely free.
.