YoungManRiver
IS-IT--Management
All,
I have this script, which is driving me crazy. It's a pretty simple one, just text messaging. Somehow, I'm not making the routine call right or not passing the vars.
Here is my code:
Code:
The commented area is where I'm having the problem. It hangs on the first Letter and does not set the new string.
Sure hope someone know what I'm doing wrong!
YMR
I have this script, which is driving me crazy. It's a pretty simple one, just text messaging. Somehow, I'm not making the routine call right or not passing the vars.
Here is my code:
Code:
Code:
<html>
<script language="JavaScript1.2">
function init() {
var txtArray = new Array(5);
var clrArray = new Array(5);
var counter = 1;
txtArray[0] = 'Technology';
txtArray[1] = 'Talent'
txtArray[2] = 'Leadership';
txtArray[3] = 'Solutions';
txtArray[4] = 'Savings';
clrArray[0] = '#ffaaaa';
clrArray[1] = '#aaaaff'
clrArray[2] = '#aaffaa';
clrArray[3] = '#999999';
clrArray[4] = '#000000';
var txa = txtArray[0]; //initial Message
var bgc = clrArray[0]; //initial Color
// setTimeout('init()',2000);//
return;
}
</script>
<BODY onload='init()'>
<table width=100% height=100% align=center valign=middle bgcolor=000000 name=target>
<tr>
<td align=center>
<h1>
<script language="JavaScript">
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100
var n=0
var xx=0
var txt = 'Test Message!'
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<txt.length;m++)
document.write('<span id="neonlight'+m+'">'+txt.charAt(m)+'</span>')
document.write('</font>')
} else {
document.write(txt)
}
function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) :
document.getElementById("neonlight"+number)
return crossobj
}
function changeBanner() {
if(counter > 4) counter = 0;
txa = txtArray[counter];
bgc = clrArray[counter];
counter++;
}
function neon(){
if (n==0){ //Change all letters to base color
for (m=0;m<txt.length;m++)
crossref(m).style.color=neonbasecolor
}
crossref(n).style.color=neontextcolor
// if (yy==0) {//
// changeBanner();//
// txt = txa;//
// document.target.bgcolor=bgc//
// }//
if (n<txt.length-1) {
n++;
} else {
n=0;
xx++;
if (xx > 4) {
xx=0;
yy++;
if (yy > 4) yy=0;
}
clearInterval(flashing);
setTimeout("beginneon()",1500);
return;
}
}
function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
</h1>
</td>
</tr>
</table>
Sure hope someone know what I'm doing wrong!
YMR