Make your own free website on





Site Map:

About Me
Photoshop Tutorials
Java-Script Tutorials
HTML Tutorials
Contact Me




Creating the prompts
So far we have this:
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.

So we need to ask people for a name, object, animal, and a verb.  We do this by creating prompts.  Here is what I came up with, you can do your own if you want.

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

If you understand all that go on to the next one.  If not go back to the Prompt tutorial.

Creating the Variables

Now we want to store the information collected, we do this by using variables.  They are really easy to make.  Here is the code.

<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>  

All you have to do to create a variable is to make up a name and make it equal something.  Also you don't have to include the var command.  It's just there so its easier to understand.  In this case we are making name equal what the user types in.

Back | Next

Originally made on 10.26.02
Formally InLiner's Graphics and Tutorials