Hello everyone,
I'm new to Javascript and have a basic knowledge of coding in general. I am attempting to learn how to create little programs for a table top RPG I play and host a forum for. But I can not figure out how to make a planet generator. (That being my first step to making my goal which is a character generator)

With that being said Ill tell you a little about the script setup I decided on. First, there are 3 planet types. 1. Arid 2. Temperate and 3. Humid, each of those have around 6-7 subcats describing the terrain.

Then there is the Habitation type. I need to program to randomly pick the planet type, either Arid, Temperate, or Humid. Then randomly select 4 of teh subcats under one of those 3 (duplicate results are okay), and also pick one habitation type. Printing that out in a text box.

I'm not sure how to tie the html and the code I want together, and I can't find any examples similar to what I want. I hope you might be able to steer me in the right direction.

I hope that makes since, here is the code I came up with so far.
Code:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>

</head>
<script language="JavaScript">
arid = new Array
arid[1]="Polar glaciers"
arid[2]="Bleak mountains"
arid[3]="Rocky hills"
arid[4]="Rolling deserts"



</script>
<body>
<form>
<table width="400" border="1">
  <tr>
    <td width="206">Planet Type:<select onChange=planettype() name=planet_list>
      <option>Arid</option>
      <option>Temperate</option>
      <option>Humid</option>
    </select>
      <br></td>
    <td width="86"><input type="button" 
onClick=function
value="Generate"></td>
    <td width="86"><input type="button" 
onclick="myfunction()" 
value="Clear"></td>
  </tr>
</table>


<table width="400" border="1">
  <tr>
    <td><TEXTAREA name=first_comment_box rows=5 cols=60 onchange="">  </TEXTAREA> </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

</form>
</body>

</html>