04/29/05 updated 01/09/06
T his script causes the scroll bars to continually flash. (IE Only).
W e have tested the code in IE5.5, IE6.0, Firefox1.0, Opera8.0 and Netscape7.02. This script worked in IE only. All other platforms tested will not see this effect. It degrades well and you will not get any error messages.
D epending on your konowledge of HTML and javascript, this is an easy, two part copy and paste code with minimal reconfigurations. The first part goes in the <HEAD> section (reconfigurations) of your document and the second part goes directly into the <BODY> tag with no reconfigurations. If you do not know howto insert an onload event handler into the <BODY> tag, see the below example.
</head>I n reference to the reconfigurations within the <HEAD> section, if you leave the default number of colors (3), then the only reconfigurations are that of the colors and the time (var rate = ?)* between color changes.
* In reference to the setting between color changes, (var rate = ?) 1000 is one second, 2000 is 2 seconds, 3000 is three seconds etc.
<!--
var rate = 1000
var C1 = "#ff9933"
var C2 = "#ffff00"
var C3 = "#ff0000"
var i = 0
I f you want to add more colors to the array, then it gets a little more involved. There is more to it then just changing the colors. See below:
Default<!--
var rate = 1000
var C1 = "#ff9933"
var C2 = "#ffff00"
var C3 = "#ff0000"
var i = 0
function doScrollbarColors()
{
if (document.all)
{
i++
if (i==1) C = C1
if (i==2) C = C2
if (i==3) C = C3
document.body.style.scrollbarBaseColor = C
if (i>2) i=0
<!--
var rate = 1000
var C1 = "#ff9933"
var C2 = "#ffff00"
var C3 = "#ff0000"
var C4 = "#ba55dc"
var i = 0
function doScrollbarColors()
{
if (document.all)
{
i++
if (i==1) C = C1
if (i==2) C = C2
if (i==3) C = C3
if (i==4) C = C4
document.body.style.scrollbarBaseColor = C
if (i>3) i=0
N
otice in the above reconfigured code how the addition of the fourth element is done. There are three parts to reconfigure:
var C4 = "#ba55dc"
if (i==4) C = C4
if (i>3) i=0
T
o add a fifth, sixth, seventh etc. element, just follow the format. The only thing to remember with this is that in the last part of the reconfiguration
if (i>3) i=0
the number will be one less than the number of colors in the code. In other words, if you have 9 colors, the number in the last reconfiguration would be
if (i>8) i=0
T o answer your next question, the answer is "Yes", if you have more than one scroll bar on the page, this effect will be visible for all scrollbars on the page.
I
f you would like to add this effect into your pages, grab the respective below link and you are there. We hope our tutorial was easy to follow and we covered everything in detail. If you have any problems with this or anything else, feel free to consult our [ FAQ ] and if you can't find the answer there, [ contact us ].
[ Get Code Here ]
[ Rate This Page ]
Search Our Site By Individual letter
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ G ]
[ H ]
[ I ]
[ J-K ]
[ L ] |
Little Tips Directory [ Page 1 ] [ Page 2 ] [ Page 3 ] [ Page 4 ] [ Page 5 ] [ Page 6 ] [ Page 7 ] |
[ Index Page 1 ]
[ Index Page 2 ]
[ Index Page 3 ]
[ Index Page 4 ]
[ Index Page 5 ] [ Index Page 6 ] [ Index Page 7 ] [ Index Page 8 ] [ Index Page 9 ] [ Index Page 10 ] [ Index Page 11 ] [ Index Page 12 ] [ Index Page 13 ] [ News Letter Archives ]
[ Navigation Page ]
[ Archives Of Published Material ] |
If you are part of the ever growing number of webmasters who enjoy
sharing your knowledge with others on web design, join The
Consigliere Ltd. web ring to broaden your scope of exposure.
Join Today
This Site Was Built And Is Maintained Exclusively by
The Webmaster @ Consigliere Ltd.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-