Hi,
I am not sure why setTimer is not working for me.
I have the folowing fucntion before </head> and included few document.write to make sure it is working.
[code=javascript]
function adding(x1){
document.write( "adding"+"< br/>");
document.write( " x1="+x1);
var x2=x1;
document.write( " x2="+x2);
if (x2 <= 10){
x2=x2+1;
document.write( " x2="+x2);
setTimeout("add ing(x2)", 300);
}else
{ document.write( "bye");
}
}
[/code]
Then I have the following after <body>
[code=javascript]
var x1=1;
document.write( "x1="+x1);
adding(x1);[/code]
I am not sure why setTimer is not working for me.
I have the folowing fucntion before </head> and included few document.write to make sure it is working.
[code=javascript]
function adding(x1){
document.write( "adding"+"< br/>");
document.write( " x1="+x1);
var x2=x1;
document.write( " x2="+x2);
if (x2 <= 10){
x2=x2+1;
document.write( " x2="+x2);
setTimeout("add ing(x2)", 300);
}else
{ document.write( "bye");
}
}
[/code]
Then I have the following after <body>
[code=javascript]
var x1=1;
document.write( "x1="+x1);
adding(x1);[/code]
Comment