Hi all,
The following JS function gives a runtime error - 'Error myButton is
undefined' when the function tries to call itself.
The function basically tries to [simply] animate a buttons text to show
the user that something is happening . . .
function buttonText(myBu tton) {
var A='/', B='-', C='\\', D='|';
var Text=eval(myBut ton+'.value');
switch (Text) {
case '|':
eval(myButton+' .value=A');
break;
case '/':
eval(myButton+' .value=B');
break;
case '-':
eval(myButton+' .value=C');
break;
default:
eval(myButton+' .value=D');
break;
}
setTimeout('but tonText(myButto n)',150);
}
The following JS function gives a runtime error - 'Error myButton is
undefined' when the function tries to call itself.
The function basically tries to [simply] animate a buttons text to show
the user that something is happening . . .
function buttonText(myBu tton) {
var A='/', B='-', C='\\', D='|';
var Text=eval(myBut ton+'.value');
switch (Text) {
case '|':
eval(myButton+' .value=A');
break;
case '/':
eval(myButton+' .value=B');
break;
case '-':
eval(myButton+' .value=C');
break;
default:
eval(myButton+' .value=D');
break;
}
setTimeout('but tonText(myButto n)',150);
}
Comment