I'm just doing this as a way to teach myself javascript so its not too important, but I have a page like this:
<!-- m --><a class="postlink" href="http://www.geocities.com/stephenlearnjavascript/index.htm">http://www.geocities.com/stephenlearnja ... /index.htm</a><!-- m -->
The script for it is:
<head>
<script language=javascript>
var insult = new Array();
insult[0] = 'You\'re so ugly I could die!';
insult[1] = 'You\'re a loser!!!!';
insult[2] = 'You need a breath mint, NERD';
insult[3] = 'Some people shouldn\'t be allowed in public. You\'re one of them.';
insult[4] = 'Hahaha, I\'m better then you, and I have more money';
insult[5] = 'Everybody hates you...';
insult[6] = 'Want to see real horror? Look in the mirror!';
insult[7] = 'Is it ugly in here, or is it just you?';
insult[8] = 'You stink!';
insult[9] = 'Idiot!';
insult[10] = 'Has anyone ever told you you stink? Well you do!'
insult[11] = 'You\'re so stupid its not even funny.'
insult[12] = 'Your Mama\'s so fat...so are you! HAHAHAHAHAHAHAHAHAHAHAHAHAHAHA'
insult[13] = 'Your face reminds me of Kurt!'
insult[14] = 'If I had a penny for every time you said something stupid, I\'d have a penny!'
insult[15] = 'I bet you\'re pretty dumb...cause you are! HAHAHAHAHA'
insult[16] = 'You look like something that died; something UGLY that died!!'
insult[17] = 'I have more friends then you.'
insult[18] = 'You remind me of someone I know...he\'s ugly...and a loser! Get it? Just like you!!!! HA! You get it...don\'t you? Cause he\'s ugly and stuff...'
insult[19] = 'You\'re never going to get married.'
insult[20] = 'You\'re so ugly, I bet your brother is too!'
insult[21] = 'Hahaha, you\'re a loser and nobody likes you! Well, so am I, but you\'re ugly!'
insult[22] = 'Your mama\'s so fat, she isn\'t skinny!'
insult[23] = 'If you died, would anyone come to your funeral?'
insult[24] = 'You\'re so dumb, a computer is insulting you! A DUMB computer!'
insult[25] = 'If brains were gas, you couldn\'t drive around a dime...a really small dime!'
insult[26] = 'LOOOOSSSSEEEEERRRRRRRR'
insult[27] = 'Somebody told me that you\'re so stupid, and I didn\'t believe them, but now I believe them.'
insult[28] = 'You\'re probably as ugly as I am.'
insult[29] = 'You\'re so dumb I bet you can\'t even spell shcool!'
insult[30] = 'It\'s people like you that make people like me laugh with other people like me at people like you who think people like me are mean because they insult people like you. Oh yeah, and you are the biggest loser on earth, secondary only to one person. YOU!'
insult[31] = 'You\'re not the biggest loser in the world. You\'re the second biggest. The biggest is whoever would go out with you!
HAAAAAAAAAAAAAAHAHAHAHAHHAAHAHHAHAHAAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHHAHAHAHAHAHAHAHAHAHHAHAHAHAH AHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHHAAHHAHAHAAHAHAHAHAHAHAHAHAHHAAHAH AHHAAHAHAHAHAHAHAHAHAHAHAHAHAAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH AHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHHAHAH AHAHAHAHHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHHAHAHAHH. Wait, thats me, nevermind.'
</script>
<script language=javascript>
var SubmitButton = new Array();
SubmitButton[0] = 'There\'s more where that came from!'
SubmitButton[1] = 'Want a Random Insult, Nerd?'
SubmitButton[2] = 'Feeling Down? Click me!'
SubmitButton[3] = 'Self-Esteem Builder 2000'
SubmitButton[4] = 'Gimme a Click LOSER'
SubmitButton[5] = 'Click me you idiot'
SubmitButton[6] = 'Want Another? Huh?'
SubmitButton[7] = 'Try Again!'
</script>
</head>
<body>
<form name=MyForm>
<textarea name=Insult size=7 rows=7 cols=50 readonly>Random Insult</textarea>
<br>
You've been insulted<input name="Counter" type="text" readonly value=http://www.webdeveloper.com/forum/archive/index.php/"0" size=1> times<br>
<input name=Submit type=button value="Click here for an insult" onClick="document.MyForm.Insult.value = insult[Math.round(Math.random()*31)] ; document.MyForm.Submit.value = SubmitButton[Math.round(Math.random()*7)] ; document.MyForm.Counter.value++">
</form>
Anyone know why it doesn't work?
P.S., I know its a stupid idea but it makes it way easier to understand javascript when I put it to use.
<!-- m --><a class="postlink" href="http://www.geocities.com/stephenlearnjavascript/index.htm">http://www.geocities.com/stephenlearnja ... /index.htm</a><!-- m -->
The script for it is:
<head>
<script language=javascript>
var insult = new Array();
insult[0] = 'You\'re so ugly I could die!';
insult[1] = 'You\'re a loser!!!!';
insult[2] = 'You need a breath mint, NERD';
insult[3] = 'Some people shouldn\'t be allowed in public. You\'re one of them.';
insult[4] = 'Hahaha, I\'m better then you, and I have more money';
insult[5] = 'Everybody hates you...';
insult[6] = 'Want to see real horror? Look in the mirror!';
insult[7] = 'Is it ugly in here, or is it just you?';
insult[8] = 'You stink!';
insult[9] = 'Idiot!';
insult[10] = 'Has anyone ever told you you stink? Well you do!'
insult[11] = 'You\'re so stupid its not even funny.'
insult[12] = 'Your Mama\'s so fat...so are you! HAHAHAHAHAHAHAHAHAHAHAHAHAHAHA'
insult[13] = 'Your face reminds me of Kurt!'
insult[14] = 'If I had a penny for every time you said something stupid, I\'d have a penny!'
insult[15] = 'I bet you\'re pretty dumb...cause you are! HAHAHAHAHA'
insult[16] = 'You look like something that died; something UGLY that died!!'
insult[17] = 'I have more friends then you.'
insult[18] = 'You remind me of someone I know...he\'s ugly...and a loser! Get it? Just like you!!!! HA! You get it...don\'t you? Cause he\'s ugly and stuff...'
insult[19] = 'You\'re never going to get married.'
insult[20] = 'You\'re so ugly, I bet your brother is too!'
insult[21] = 'Hahaha, you\'re a loser and nobody likes you! Well, so am I, but you\'re ugly!'
insult[22] = 'Your mama\'s so fat, she isn\'t skinny!'
insult[23] = 'If you died, would anyone come to your funeral?'
insult[24] = 'You\'re so dumb, a computer is insulting you! A DUMB computer!'
insult[25] = 'If brains were gas, you couldn\'t drive around a dime...a really small dime!'
insult[26] = 'LOOOOSSSSEEEEERRRRRRRR'
insult[27] = 'Somebody told me that you\'re so stupid, and I didn\'t believe them, but now I believe them.'
insult[28] = 'You\'re probably as ugly as I am.'
insult[29] = 'You\'re so dumb I bet you can\'t even spell shcool!'
insult[30] = 'It\'s people like you that make people like me laugh with other people like me at people like you who think people like me are mean because they insult people like you. Oh yeah, and you are the biggest loser on earth, secondary only to one person. YOU!'
insult[31] = 'You\'re not the biggest loser in the world. You\'re the second biggest. The biggest is whoever would go out with you!
HAAAAAAAAAAAAAAHAHAHAHAHHAAHAHHAHAHAAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHHAHAHAHAHAHAHAHAHAHHAHAHAHAH AHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHHAAHHAHAHAAHAHAHAHAHAHAHAHAHHAAHAH AHHAAHAHAHAHAHAHAHAHAHAHAHAHAAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH AHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHHAHAH AHAHAHAHHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHHAHAHAHH. Wait, thats me, nevermind.'
</script>
<script language=javascript>
var SubmitButton = new Array();
SubmitButton[0] = 'There\'s more where that came from!'
SubmitButton[1] = 'Want a Random Insult, Nerd?'
SubmitButton[2] = 'Feeling Down? Click me!'
SubmitButton[3] = 'Self-Esteem Builder 2000'
SubmitButton[4] = 'Gimme a Click LOSER'
SubmitButton[5] = 'Click me you idiot'
SubmitButton[6] = 'Want Another? Huh?'
SubmitButton[7] = 'Try Again!'
</script>
</head>
<body>
<form name=MyForm>
<textarea name=Insult size=7 rows=7 cols=50 readonly>Random Insult</textarea>
<br>
You've been insulted<input name="Counter" type="text" readonly value=http://www.webdeveloper.com/forum/archive/index.php/"0" size=1> times<br>
<input name=Submit type=button value="Click here for an insult" onClick="document.MyForm.Insult.value = insult[Math.round(Math.random()*31)] ; document.MyForm.Submit.value = SubmitButton[Math.round(Math.random()*7)] ; document.MyForm.Counter.value++">
</form>
Anyone know why it doesn't work?
P.S., I know its a stupid idea but it makes it way easier to understand javascript when I put it to use.