View Full Version : Lost and confused

08-28-2008, 05:04 AM
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.

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>

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

<table width="400" border="1">
<td width="206">Planet Type:<select onChange=planettype() name=planet_list>
<td width="86"><input type="button"
<td width="86"><input type="button"

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum