A
alistair
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(myButton) {
var A='/', B='-', C='\\', D='|';
var Text=eval(myButton+'.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('buttonText(myButton)',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(myButton) {
var A='/', B='-', C='\\', D='|';
var Text=eval(myButton+'.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('buttonText(myButton)',150);
}