FraserBrown
IS-IT--Management
i'd like to use a typewriter effect to display large ammounts of text but haven't been able to get it to type quickly enough. i thought one solution would be to break the text up into an array and print each word out instead of character by character. here's the basic idea that i've tried.
var text_string = "blah blah blah blah blah blah blah blah blah blah blah blah blah ";
var text_array = text_string.split(" "
;
function typeWriter()
{
for (loop=0; loop < text_array.length; loop++)
{
document.writeln(text_array[loop] + " "
;
setTimeout('typeWriter()',50);
}
}
can anyone tell me why it isn't working or how i might do it better?
also, is this possible to print out to the page in a table or layer and not in a textarea?
thanks
var text_string = "blah blah blah blah blah blah blah blah blah blah blah blah blah ";
var text_array = text_string.split(" "
function typeWriter()
{
for (loop=0; loop < text_array.length; loop++)
{
document.writeln(text_array[loop] + " "
setTimeout('typeWriter()',50);
}
}
can anyone tell me why it isn't working or how i might do it better?
also, is this possible to print out to the page in a table or layer and not in a textarea?
thanks