Single_Tasker
05-03-2006, 07:49 PM
Flashing Table Border Script
http://www.dynamicdrive.com/dynamicindex11/other2.htm
I've pasted the DD script below.
The script and DD example page are set up to flash the border of ONE table. I have 4 seperate tables located at different places on my webpage. I have pasted the script 4 seperate times then changed the function and ID of each script- and its corresponding table- to flash the borders on the 4 tables. All of the borders are doing the exact same thing with the exact colors- which is what I want.
Can I use the script just ONCE- with modifications- that allow it to do the exact same thing on the 4 tables- rather than using the entire script 4 times? If so- be gentle- I'll need to see the fixed code.
////////////////////
Flashing Table Border Script
http://www.dynamicdrive.com/dynamicindex11/other2.htm
<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- © 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>
//////////////////////////
Thanks,
Bill
http://www.dynamicdrive.com/dynamicindex11/other2.htm
I've pasted the DD script below.
The script and DD example page are set up to flash the border of ONE table. I have 4 seperate tables located at different places on my webpage. I have pasted the script 4 seperate times then changed the function and ID of each script- and its corresponding table- to flash the borders on the 4 tables. All of the borders are doing the exact same thing with the exact colors- which is what I want.
Can I use the script just ONCE- with modifications- that allow it to do the exact same thing on the 4 tables- rather than using the entire script 4 times? If so- be gentle- I'll need to see the fixed code.
////////////////////
Flashing Table Border Script
http://www.dynamicdrive.com/dynamicindex11/other2.htm
<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- © 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>
//////////////////////////
Thanks,
Bill