Important alert: (current site time 7/15/2013 1:01:49 PM EDT)
 

VB icon

Background Fade Display This script fades the BG color and tells you what the current BG color hex c

Email
Submitted on: 1/17/2002 12:54:51 PM
By: hot gal  
Level: Beginner
User Rating: Unrated
Compatibility: JavaScript
Views: 5203
 
     This script fades the BG color and tells you what the current BG color hex code is. Visit www.nibbleguru.com
 
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: Background Fade Display This script fades the BG color and tells you what the current BG color hex c
' Description:This script fades the BG color and tells you what the current BG color hex code is.
Visit www.nibbleguru.com
' By: hot gal
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2590&lngWId=14'for details.'**************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Background Fade with Display (Color) : JavaScripts</title>
</head>
<body>
<!-- START OF SCRIPT -->
<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 = "50";
//if you want to change the starting color, add the starting code here
//instead of aa (two digits, only numbers and/or a, b, c, d, e, f).
 var color = 1000;
 var interval = 111;
//if you want to change the speed of the color-change,
//change the 111 to the number of hex-codes you want between two changes.
//not every number gives a nice result!
 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()", 10);
document.myform.ikke.value = total;
}
</script>
</HEAD>
<body onLoad = "brighter()" text="white" LINK="C0C0C0" VLINK="C0C0C0">
<form name="myform">
<P>This is the code of the current color
<input name = "ikke" type="text" size="7">
</form>
<!-- END OF SCRIPT -->
<p><font color=black>Hit you browser's 'Back' button to go back <h3><a href="http://www.nibbleguru.com/">Nibble Guru</a> <a href="http://imazine.nibbleguru.com/">imaZine</a></h3></font></p>
</body>
</html>


Other 3 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 Beginner 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

 There are no comments on this submission.
 

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.