Thread
:
NEWBIE - Random text generator problem, button not staying?
View Single Post
10-09-2012, 02:35 PM
PM User
|
#
2
jmrker
Senior Coder
Join Date: Aug 2006
Location: FL
Posts: 2,765
Thanks: 29
Thanked 453 Times in 447 Posts
Code:
document.write(r_text[i]);
You cannot use a document.write after the page has been rendered.
If you call it, it reloads the page to the original contents.
Consider creating a <div> area with an ID and using .innerHTML = r_text[i] instead
jmrker
View Public Profile
Find More Posts by jmrker