Make your own free website on Tripod.com
 

 

 

 

 



Site Map:

Home
About Me
Links
Graphics
Photoshop Tutorials
Java-Script Tutorials
HTML Tutorials
Contact Me

 

 

Putting it all Together

So after all this we are about done.  But you will know how to create a Mad-Lib or whatever you want.

All Together

So here is the code that we have so far:

<script language="JavaScript"> var name  = prompt("Give me a name",""); var object = prompt("Give me an object",""); var animal = prompt("Name a really cool animal",""); var verb = prompt("Now give me a verb, present tense",""); </script>

And here is the story:

One day <name> was walking down the street, he ran across a <object> and started to chew on it.  <name> ran down the street as fast as he could, it was like a wild <animal> <name> started to <verb> as fast as he could to get the <object> out of his throat.

 

 

It's Almost Over (Relief!)

So now that we have got our variables collected all we have to do is add the script to display it on the screen.  Don't forget to include spaces after words and before variables.

<script language="JavaScript"> var name  = prompt("Give me a name",""); var object = prompt("Give me an object",""); var animal = prompt("Name a really cool animal",""); var verb = prompt("Now give me a verb, present tense",""); document.write("One day "); document.write(name); document.write(" was walking down the street, he ran across a "); document.write(object); document.write(" and started to chew on it.  "); document.write(name); document.write(" ran down the street as fast as he could, it was like a wild "); document.write(animal); document.write(".  "); document.write(name); document.write(" started to "); document.write(verb); document.write(" as fast as he could to get the "); document.write(object); document.write(" out of his throat."); </script>

Results: Click here to see it in action.

It is kind of long, but that's how they all are.  And we are done, you can create some a lot faster than this one.  Because we didn't have to do all of those steps, try creating your own.

Back

Originally made on 10.26.02
Formally InLiner's Graphics and Tutorials