![]() |
NEWBIE - Random text generator problem, button not staying?
Hiya, this is my first post - I'll try to make sure I'm doing things correct!
I'm trying to create a random text generator, I've got the random text generating part down, but after I click the button and get the random text, I lose my button so I can't continue to generate random text. Help? Code:
<!DOCTYPE html>http://snipt.org/vfAe1 Also, any resources or directions you can provide would be great, my knowledge is good in some areas, and I'm a complete idiot in other areas! |
Code:
document.write(r_text[i]);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 |
Code:
Not sure if I've done this correctly. |
Code:
<!DOCTYPE html>Your uppercase function is quite superflous here. <script language=javascript> is long deprecated. Use <script type = "text/javascript"> instead (in fact also deprecated but still necessary for IE<9). The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code. Quizmaster: Which African country gives its name to the complaint known as 'gippy tummy'? Contestant: Venezuela. |
| All times are GMT +1. The time now is 08:13 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.