By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,461 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,461 IT Pros & Developers. It's quick & easy.

Can someone plz check this (im a noob)

P: n/a
I dont get whats wrong with this
<html>
<head>
<title>Random Mad Lib!</title>

<script language="JavaScript">
<!-- Hide

function displaymadlib(w1, w2, w3, w4, w5, w6, w7, w8, w9, w0, w11, w22, w33,
w44, w55) {

document.writeln("The attack of the purple tissue!!! Once there was a/an "
+ w1
+ " tissue attacking a "
+ w2
+ " in"
+ w3
+ "! The tissue was even"
+ w4
+ "the"
+ w5
+ "! 4"
+ w6
+ "died of heart attacks. The"
+ w7
+ "was"
+ w8
+ "Suddenly, "
+ 9
+ "man came to"
+ w0
+ "the"
+ w11
+ ". He went up to the tissue and kicked it in the
+ w22
+ ", and the tissue"
+ w33
+ "to the ground. Its snot covered the "
+ w44
+ ", and everything there"
+ w55
+ ".");return true
}

// stop the hiding -->

</SCRIPT>

</head>

<body onload="document.madlib.adj1.select()">

<FORM NAME="madlib">
<p>
adjective:
<input name="adj1"></p><br>
<p>
place:
<input name="place1"></p><br>
<p>
another place:
<input name="place2"></p><br>
<p>
verb:
<input name="verb1"></p><br>
<p>
plural noun:
<input name="pnoun1"></p><br>
<p>
another plural noun:
<input name="pnoun2"></p><br>
<p>
place:
<input name="place3"></p><br>
<p>
adjective:
<input name="adj2"></p><br>
<p>
noun:
<input name="noun1"></p><br>
<p>
verb:
<input name="verb2"></p><br>
<p>
noun:
<input name="noun2"></p><br>
<p>
body part:
<input name="bpart"></p><br>
<p>
verb:
<input name="verb3"></p><br>
<p>
place:
<input name="place4"></p><br>
<p>
verb:
<input name="verb4"></p><br>
<p>
<br>
<p>

<INPUT TYPE="button" NAME="Submit" VALUE="Submit to get your mad lib!"
OnClick="displaymadlib(document.madlib.adj1.value,
document.madlib.place1.value, document.madlib.place2.value,
document.madlib.verb1.value, document.madlib.pnoun1.value,
document.madlib.pnoun2.value, document.madlib.place3.value,
document.madlib.adj2.value, document.madlib.noun1.value,
document.madlib.verb2.value, document.madlib.noun2.value,
document.madlib.bpart.value, document.madlib.verb3.value,
document.madlib.place4.value, document.madlib.verb4.value)">

<INPUT TYPE="reset" VALUE="reset">

</form>
</body>

</html>
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
see response in ur first post..

ok lemme tell you ur mistakes...

where u should have "w9" you got 9

the kline after "w11" isn't closed by a "

all in all ur not calling it very nicely by sending a whole list of
parameters to the function, ur bound to make mistakes...

check my first response

good luck :0)
"Rtritell" <rt******@aol.com> wrote in message
news:20***************************@mb-m14.aol.com...
I dont get whats wrong with this
<html>
<head>
<title>Random Mad Lib!</title>

<script language="JavaScript">
<!-- Hide

function displaymadlib(w1, w2, w3, w4, w5, w6, w7, w8, w9, w0, w11, w22, w33, w44, w55) {

document.writeln("The attack of the purple tissue!!! Once there was a/an " + w1
+ " tissue attacking a "
+ w2
+ " in"
+ w3
+ "! The tissue was even"
+ w4
+ "the"
+ w5
+ "! 4"
+ w6
+ "died of heart attacks. The"
+ w7
+ "was"
+ w8
+ "Suddenly, "
+ 9
+ "man came to"
+ w0
+ "the"
+ w11
+ ". He went up to the tissue and kicked it in the
+ w22
+ ", and the tissue"
+ w33
+ "to the ground. Its snot covered the "
+ w44
+ ", and everything there"
+ w55
+ ".");return true
}

// stop the hiding -->

</SCRIPT>

</head>

<body onload="document.madlib.adj1.select()">

<FORM NAME="madlib">
<p>
adjective:
<input name="adj1"></p><br>
<p>
place:
<input name="place1"></p><br>
<p>
another place:
<input name="place2"></p><br>
<p>
verb:
<input name="verb1"></p><br>
<p>
plural noun:
<input name="pnoun1"></p><br>
<p>
another plural noun:
<input name="pnoun2"></p><br>
<p>
place:
<input name="place3"></p><br>
<p>
adjective:
<input name="adj2"></p><br>
<p>
noun:
<input name="noun1"></p><br>
<p>
verb:
<input name="verb2"></p><br>
<p>
noun:
<input name="noun2"></p><br>
<p>
body part:
<input name="bpart"></p><br>
<p>
verb:
<input name="verb3"></p><br>
<p>
place:
<input name="place4"></p><br>
<p>
verb:
<input name="verb4"></p><br>
<p>
<br>
<p>

<INPUT TYPE="button" NAME="Submit" VALUE="Submit to get your mad lib!"
OnClick="displaymadlib(document.madlib.adj1.value,
document.madlib.place1.value, document.madlib.place2.value,
document.madlib.verb1.value, document.madlib.pnoun1.value,
document.madlib.pnoun2.value, document.madlib.place3.value,
document.madlib.adj2.value, document.madlib.noun1.value,
document.madlib.verb2.value, document.madlib.noun2.value,
document.madlib.bpart.value, document.madlib.verb3.value,
document.madlib.place4.value, document.madlib.verb4.value)">

<INPUT TYPE="reset" VALUE="reset">

</form>
</body>

</html>

Jul 23 '05 #2

P: n/a
Don't use "noob".

"N" is very close to "B" on the key board...

"Rtritell" <rt******@aol.com> wrote in message
news:20***************************@mb-m14.aol.com...
I dont get whats wrong with this

<snip!>
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.