krautinator
10-02-2003, 09:27 AM
yes, I'm a newbie, but I don't care, I need help
just had to get that off my shoulderz
ok
I want to create a message that prints out when my users come to my web page using document.write, but I want to use an array with the sentence in it, in conjunction w/ a timer, so that it will look kinda like it's be typed out by a person, I have been fidgeting with this code for HOURS, can some one plz help me:
herez the code I do have, what's wrong w/ it?(everthing?hopefully not)
function Array()
{
var PrintOut = ('h','e','l','l','o','\0');
var timerId;
for(x=0;x<PrintOut.length;x++)
{
timerId=setTimeout(Document.write(PrintOut[x]),200);
clearTimeout(timerId;)
}
}
then I have it call the function when it loads the page:
<body onLoad="Array()">
I could do this so easily in C++:mad:
just had to get that off my shoulderz
ok
I want to create a message that prints out when my users come to my web page using document.write, but I want to use an array with the sentence in it, in conjunction w/ a timer, so that it will look kinda like it's be typed out by a person, I have been fidgeting with this code for HOURS, can some one plz help me:
herez the code I do have, what's wrong w/ it?(everthing?hopefully not)
function Array()
{
var PrintOut = ('h','e','l','l','o','\0');
var timerId;
for(x=0;x<PrintOut.length;x++)
{
timerId=setTimeout(Document.write(PrintOut[x]),200);
clearTimeout(timerId;)
}
}
then I have it call the function when it loads the page:
<body onLoad="Array()">
I could do this so easily in C++:mad: