lostinbeta
June 19th, 2003, 12:50 PM
Ok, I am really confused here. I haven't worked much with setInterval in Javascript, but I assumed it worked the same as it does in Actionscript, but apparently it doesn't.
This works in Flash...
function notify(m) {
trace(m);
}
setInterval(notify, 2000, "hello world");
This doesn't work in Javascript...
function notify(m) {
alert(m);
}
setInterval(notify, 2000, "hello world");
I checked the O'Reilly Reference in my Dreamweaver and it says in there that you pass the arguments at the end like I did there, but it just isn't working!
Anyone know what I am doing wrong?
This works in Flash...
function notify(m) {
trace(m);
}
setInterval(notify, 2000, "hello world");
This doesn't work in Javascript...
function notify(m) {
alert(m);
}
setInterval(notify, 2000, "hello world");
I checked the O'Reilly Reference in my Dreamweaver and it says in there that you pass the arguments at the end like I did there, but it just isn't working!
Anyone know what I am doing wrong?