Log In · Register

 
blink boxes, won't blink! =O
dreamswept
post Dec 17 2004, 03:52 PM
Post #1


d0rk.
*

Group: Member
Posts: 8
Joined: Nov 2004
Member No: 60,660



what're wrong with my blink boxes? >;(

CODE
<script>
<!-- begin code provided by createblog.com -->

<!--
//blink boxes - xanga.com/add_ons
//by sean f http://www.xanga.com/seanmeister

//fixed to work with new security measures by
//hotaru_01 http://www.xanga.com/hotaru_01

// customize by changing the values below
// these are the various colors, in quotes, seperated by commas
var blinkColors = new Array("#ee1600","#c60e00","#2fbdo9","#1f9000");
// the border color
var blinkBorderColor = "#000000"
// the border width, in pixels
var blinkBorderWidth = 1;
// the # of rows
var blinkRows = 2;
// the # of columns
var blinkCols = 25;
// the width of the entire box, in pixels or %
var blinkWidth = 365;
// the height of each row, in pixels
var blinkRowHeight = 10;
// speed of blinking, in milliseconds
var blinkRate = 10;

// do not edit below this line
st=setTimeout;
document.write("<table id='blinkbox' width='" + blinkWidth +"' border = 0 cellspacing='" + blinkBorderWidth + "' cellpadding=0 bgcolor='" + blinkBorderColor +"'>");
for (r = 0; r < blinkRows; r++){
document.write("<TR>");
for (c = 0; c < blinkCols; c++){
document.write("<TD height='" + blinkRowHeight + "'></TD>");
}
document.write("</TR>");
}
document.write("</table>");
// ... and this makes it blink
function blinkIt() {
changecell = Math.floor(Math.random() * (blinkCols * blinkRows));
changecolor = Math.floor(Math.random() * blinkColors.length);
bb = document.getElementById("blinkbox");
bbtd = bb.getElementsByTagName("td");
bbtd[changecell].style.backgroundColor = blinkColors[changecolor];
st('blinkIt()', blinkRate);
}
blinkIt();
//-->

<!-- end code provided by createblog.com -->
</script>
 
 
Start new topic
Replies
*mona lisa*
post Dec 17 2004, 05:44 PM
Post #2





Guest






this is what i have and i'm pretty sure it works:

CODE
<!-- begin code provided by createblog.com -->
<script language="JavaScript">
var blinkColors = new Array("ffffff","#000000");
var blinkBorderColor = "#ffffff"
var blinkBorderWidth = 1;
var blinkRows = 1;
var blinkCols = 40;
var blinkWidth = "700";
var blinkRowHeight = 10;
var blinkRate = 15;
document.write("<table id='blinkbox' width='" + blinkWidth +"' border = 0 cellspacing='" + blinkBorderWidth + "' cellpadding=0 bgcolor='" + blinkBorderColor +"'>");
for (r = 0; r < blinkRows; r++){
document.write("<TR>");
for (c = 0; c < blinkCols; c++){
document.write("<TD height='" + blinkRowHeight + "'></TD>");
}
document.write("</TR>");
}
document.write("</table>");
function blinkIt() {
changecell = Math.floor(Math.random() * (blinkCols * blinkRows));
changecolor = Math.floor(Math.random() * blinkColors.length);
document.getElementById("blinkbox").getElementsByTagName("td")[changecell].style.backgroundColor = blinkColors[changecolor];

setTimeout('blinkIt()', blinkRate);
}
blinkIt();
//-->
</script>
<!-- end code provided by createblog.com -->
 

Posts in this topic
dreamswept   blink boxes   Dec 17 2004, 03:52 PM
mona lisa   this is what i have and i'm pretty sure it wor...   Dec 17 2004, 05:44 PM


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: