home *** CD-ROM | disk | FTP | other *** search
- <ccResource>
- <ccTitle>
- Fading Display
- </ccTitle>
- <ccCategory>
- Fun Stuff
- </ccCategory>
- <ccDescription>
- Just put this script on your webpage and the background color will change with a display of what the current hex code is.
- </ccDescription>
- <ccInstructions>
-
- </ccInstructions>
- <ccHeadContent>
-
- </ccHeadContent>
- <ccBodyContent>
- <SCRIPT Language = "JavaScript">
-
- start = new Date();
- minstart = start.getMinutes()
- secstart = start.getSeconds()
-
- function brighter(){
-
- var now = new Date();
-
- var seconds = now.getSeconds();
-
- var minutes = now.getMinutes();
-
- var base = "00";
-
- var color = 1000;
-
- var interval = 103;
-
- var sec= interval * (seconds - secstart);
-
- var min= 60 * interval * (minutes - minstart);
-
- var add= color + min + sec;
-
- total= base + add;
- if (add>=9999) {secstart = seconds; minstart = minutes}
-
- document.bgColor = total;
- setTimeout("brighter()", 1000);
- document.coffeeform.cc.value = total;
- }
- </script>
- </HEAD>
-
- <form name="coffeeform">
- <P>This is the hex code of the current background color
- <input name = "cc" type="text" size="7">
- </form>
- </ccBodyContent>
- <ccElementContent>
-
- <ccElementName>onLoad</ccElementName>
- <ccElementAction>brighter()</ccElementAction>
-
- </ccElementContent>
- <ccExtraData>
-
- </ccExtraData>
- </ccResource>