PDA

View Full Version : Does anyone know how I can change this code to .....



bigheaven
01-16-2006, 02:43 AM
Does anyone know how I can change this code to make text do this? It is a flashing table by the way. It flashes from color to another. You can see what I'm talking about in the thread below.



<table border="0" width="280" id="myexample" style="border:5px solid green">
<tr>
<td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
</tr>
</table>
<script language="JavaScript1.2">
<!--

/*
Flashing Table Border Script- &#169; Dynamic Drive (www.dynamicdrive.com)
Visit http://www.dynamicdrive.com for this script
Credit must stay intact for use
*/

//configure interval btw flash (1000=1 second)
var speed=500

function fla****(){
var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
if (crosstable){
if (crosstable.style.borderColor.indexOf("green")!=-1)
crosstable.style.borderColor="red"
else
crosstable.style.borderColor="green"
}
}
setInterval("fla****()", speed)
//-->
</script>

bigheaven
01-16-2006, 02:45 AM
<a href="http://www.dynamicdrive.com/dynamicindex11/other2.htm">

jscheuer1
01-16-2006, 08:29 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Flash Table Border and/or Text Color</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
<body>
<table border="0" width="280" id="myexample" style="border:5px solid green">
<tr>
<td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
</tr>
</table>
<script type="text/javascript">

/*
Flashing Table Border &/or Text Script- Dynamic Drive (www.dynamicdrive.com)
Visit http://www.dynamicdrive.com for this script
Credit must stay intact for use
Modified in DD Forums by jscheuer1
http://www.dynamicdrive.com/forums
*/

//configure interval btw flash (1000=1 second)
var speed=500
var startColor='green'
var changeColor='red'
rotate=2 //Set to 1 (border only), 2 (text only), or 3 (border & text).

//////////////////Stop Editing///////////////////

var baseColor=startColor

function flashit(){
var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
if (crosstable){
if (startColor==baseColor){
if (rotate==1||rotate==3)
crosstable.style.borderColor=changeColor
if (rotate==2||rotate==3)
crosstable.style.color=changeColor
startColor=''
}
else{
if (rotate==1||rotate==3)
crosstable.style.borderColor=baseColor
if (rotate==2||rotate==3)
crosstable.style.color=baseColor
startColor='green'
}
}
}
setInterval("flashit()", speed)

</script>
</body>
</html>

Twey
01-16-2006, 05:24 PM
And watch the epileptics drop.
Seriously, this is a very bad idea; even those people who don't have epilepsy will find the effect irritating and possibly headache-inducing.

I love the way the forum censored flash it() (minus the space). Remember to correct that if you copy/paste.

jscheuer1
01-17-2006, 05:41 AM
And watch the epileptics drop.
Seriously, this is a very bad idea; even those people who don't have epilepsy will find the effect irritating and possibly headache-inducing.

I agree 200%


I love the way the forum censored flash it() (minus the space). Remember to correct that if you copy/paste.

Solved! Don't try this at home kids.:)