|
Have your table borders flash between two colours. Can be activated onmouseover. |
<script type="text/javascript">
<!--
IE=document.all
function flash(){
if(IE){
if (document.getElementById("tborder").style.borderColor=="black"){
document.getElementById("tborder").style.borderColor="red"
}
else{
document.getElementById("tborder").style.borderColor="black"
}
}
else{
if (document.getElementById("tborder").style.borderColor=="black black black black"){
document.getElementById("tborder").style.borderColor="#FF0000 #FFFF00 #00FF00 #0000FF"
}
else{
document.getElementById("tborder").style.borderColor="black black black black"
}
}
}
setInterval("flash()", 1000)
//-->
</script>
The following is the opening TABLE tag.
<table border="0" width="100%" id="tborder" style="border:5px outset black">
|
You can have the effect with a Mouse Event This table border will flash whenever your mouse is over the table . |
<script type="text/javascript">
<!--
IE=document.all
function flash2(){
if(IE){
if (document.getElementById("tborder2").style.borderColor=="#c9bda9"){
document.getElementById("tborder2").style.borderColor="#8e8462"
}
else{
document.getElementById("tborder2").style.borderColor="#c9bda9"
}
}
else{
if (document.getElementById("tborder2").style.borderColor=="#c9bda9 #c9bda9 #c9bda9 #c9bda9"){
document.getElementById("tborder2").style.borderColor="#8e8462 #8e8462 #8e8462 #8e8462"
}
else{
document.getElementById("tborder2").style.borderColor="#c9bda9 #c9bda9 #c9bda9 #c9bda9"
}
}
nogo=setTimeout("flash2()", 500)
}
function stop(){
clearTimeout(nogo)
if(IE){
document.getElementById("tborder2").style.borderColor="black"
}
else{
document.getElementById("tborder2").style.borderColor="black black black black"
}
}
//-->
</script>
The following is placed in the opening TABLE tag.
id="tborder2" style="border:5px outset black" onmouseover="flash2()" onmouseout="stop()"
Any of the above can be placed in the opening TD tag to flash the TD border.