PDA

View Full Version : Calculation Form Question/problem

Mayo
09-10-2007, 11:46 AM
Hiya I am trying to write a role playing charecter creation sheet for a club and to be honest im stuck
Not knowing anything about scripting I am baffled

What I want to happen is for the sheet to show how many starting points they have to spend on the charecter Spells/skills etc

I would like to include a running countdown of how many points they have left to spen.

<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

<meta http-equiv="Content-Language" content="en-gb" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<SCRIPT SRC="valid.js" ID="sqValidator"></SCRIPT><SCRIPT LANGUAGE="JavaScript" ID="sqValidate"><!--
function validate(theForm)
{
var formTest = true;
if (checkName(theForm.fname) != true) {formTest = false};
if (checkName(theForm.initial) != true) {formTest = false};
if (checkName(theForm.lname) != true) {formTest = false};

if (theForm.country == "")

if (checkEmail(theForm.email) != true) {formTest = false};
if (checkDate(theForm.day, theForm.month, theForm.year, "birthday") != true) {formTest = false};
if (checkCreditCard(theForm.cctype,theForm.cc) != true) {formTest = false};
return (formTest);
}
// -->
</SCRIPT>
<TITLE></TITLE>

<body>

<p>This is a wip for online char gen sheet</p>

<body>
<FORM METHOD="POST" ACTION="http://www.dragonlorelarp.co.uk/contact/FormMail.cgi"" ONSUBMIT="validate(this) ID="myform">
<input type="hidden" name="recipient" value="mayo@dragonlorelarp.co.uk"/>
<input type="hidden" name="subject" value="Booking Form"/>
<input type="hidden" name="redirect" value="http://www.dragonlorelarp.co.uk/bookingformsent.html"/>
<input type="hidden" name="required" value=""/>

<TABLE style="width: 94%" class="style5">
<TR>
<td style="width: 163px">
<input name="Player Name" type="text" style="width: 163px" /></td>
<td style="width: 141px">
<input name="email_address" type="text" style="width: 170px" /></td>

<td>&nbsp;</td>

</TR>
<TR>
<td style="width: 85px">Char Name</td>
<td style="width: 163px"><input type="text" size="30" name="Charecter_Name"/></td>
<td>Race</td>
<td style="width: 141px"><select name="Race" style="width: 157px">
<option>Choose</option>
<option>Human</option>
<option>Elf</option>
<option>Dark Elf</option>
<option>Orc</option>
<option>Troll</option>
<option>Goblin</option>
<option>Dwaf</option>
<option>Halfling</option>
<option>Fae</option>
<option>Other Must email char ref</option>
</select></td>

<td>&nbsp;</td>

</TR>
<TR>
<td style="width: 85px">Armour</td>
<td style="width: 163px"><select name="Armour">
<option>None</option>
<option>Fur</option>
<option>Leather</option>
<option>Metal</option>
</select></td>
<td>Shield</td>
<td style="width: 141px"><select name="Shield" style="width: 74px">
<option>None</option>
<option>Wooden</option>
<option>Metal</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">Hit Poits</td>
<td style="width: 163px"><input name="hit points" type="text" /></td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td style="width: 113px">Select Magic Spell</td>
<td style="width: 141px">How many Purchased</td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">Magic</td>
<td style="width: 163px"><span lang="EN-GB">Knockback<strong>
</strong></span></td>
<td style="width: 113px"><input name="knockback" type="checkbox" /></td>
<td style="width: 141px"><select name="knockback_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Strike down</span></td>
<td style="width: 113px"><input name="strike_down" type="checkbox" /></td>
<td style="width: 141px"><select name="strike_down_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Detect Magic</span></td>
<td style="width: 113px"><input name="detect_magic" type="checkbox" /></td>
<td style="width: 141px"><select name="detect_magic_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Fear<strong> </strong>
</span></td>
<td style="width: 113px"><input name="fear" type="checkbox" /></td>
<td style="width: 141px"><select name="fear_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">Wound<strong> </strong>
</td>
<td style="width: 113px"><input name="wound" type="checkbox" /></td>
<td style="width: 141px"><select name="wound_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Tangle<strong> </strong>
</span></td>
<td style="width: 113px"><input name="tangle" type="checkbox" /></td>
<td style="width: 141px"><select name="tangle_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>
<TR>
<td style="height: 22px; width: 85px;"></td>
<td style="height: 22px; width: 163px;"><span lang="EN-GB">Heal
Location</span></td>
<td style="height: 22px; width: 113px;">
<input name="heal_location" type="checkbox" /></td>
<td style="height: 22px; width: 141px;">
<select name="heal_location_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td style="height: 22px"></td>
</TR>
<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Full Heal</span></td>
<td style="width: 113px"><input name="full_heal" type="checkbox" /></td>
<td style="width: 141px"><select name="full_heal_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Regenerate Limb</span></td>
<td style="width: 113px">
<input name="regen_limb" type="checkbox" style="width: 20px" /></td>
<td style="width: 141px"><select name="regen_limb_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Cure<strong> </strong>
</span></td>
<td style="width: 113px"><input name="cure" type="checkbox" /></td>
<td style="width: 141px"><select name="cure_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td>Select Skill</td>
<td style="width: 141px">How Many Purchased</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">Skills</td>
<td style="width: 163px"><span lang="EN-GB">Disarm</span></td>
<td><input name="disarm" type="checkbox" /></td>
<td style="width: 141px"><select name="dirarm_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Parry</span></td>
<td><input name="parry" type="checkbox" /></td>
<td style="width: 141px"><select name="parry_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px; height: 22px;"></td>
<td style="width: 163px; height: 22px;"><span lang="EN-GB">
Knockback</span></td>
<td style="height: 22px;">
<input name="knockback" type="checkbox" /></td>
<td style="width: 141px; height: 22px;"><select name="knockback_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></td>
<td style="height: 22px"></td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Critical Hit</span></td>
<td><input name="critical_hit" type="checkbox" /></td>
<td style="width: 141px"><select name="critical_hit_level">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">Abilities</td>
<td style="width: 163px">Bind Wounds</td>
<td><input name="bind_wounds" type="checkbox" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">Speak Language</td>
<td><input name="launguage" type="checkbox" /></td>
<td><select name="selected_launguage">
<option>Select Launguage</option>
<option>Elven (elf and dark elf native)</option>
<option>Orsimer (Orc and Goblin Native)</option>
<option>Drull (Troll and Ogre Native)</option>
<option>Dwarven (Dwarf Native)</option>
<option>Draconian</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<option>Select Launguage</option>
<option>Elven (elf and dark elf native)</option>
<option>Orsimer (Orc and Goblin Native)</option>
<option>Drull (Troll and Ogre Native)</option>
<option>Dwarven (Dwarf Native)</option>
<option>Draconian</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Numerate</span></td>
<td><input name="numerate" type="checkbox" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Gather Beneficial Herbs</span></td>
<td><input name="benifical_herbs" type="checkbox" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Gather Harmful Herbs</span></td>
<td><input name="harmful_herbs" type="checkbox" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 163px"><span lang="EN-GB">Smithing</span></td>
<td><input name="smithing" type="checkbox" /></td>
<td><select name="speciality">
<option>Select Speciality</option>
<option>Fur and leather armour, Non metal weapons and wooden shields</option>
<option>Metal armour, Metal weapons and Metal shields</option>
<option>Magical and unique material Armour, Weapons and Shields</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Potion Making</span></td>
<td><input name="potion_making" type="checkbox" /></td>
<td><select name="potion_making_level">
<option>Select Rank</option>
<option>Rank 1</option>
<option>Rank 2</option>
<option>Rank 3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Poison Making</span></td>
<td><input name="poison_making" type="checkbox" /></td>
<td><select name="poison_making_level">
<option>Select Rank</option>
<option>Rank 1</option>
<option>Rank 2</option>
<option>Rank 3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><span lang="EN-GB">Enchantment</span></td>
<td><input name="enchantment" type="checkbox" /></td>
<td><select name="enchanment_level">
<option>Select Rank</option>
<option>Rank 1</option>
<option>Rank 2</option>
<option>Rank 3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<option>Select Rank</option>
<option>Rank 1</option>
<option>Rank 2</option>
<option>Rank 3</option>
</select></td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>

<TR>
<td style="width: 85px">&nbsp;</td>
<td style="width: 163px"><INPUT TYPE="SUBMIT" VALUE="Submit Form"><input name="Reset1" type="reset" value="Reset Form" style="width: 94px" /></td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</TR>
</TABLE> </FORM> </BODY>
</HTML>

<p>&nbsp;</p>
<p>&nbsp;</p>

</body>

</html>

Mayo
09-10-2007, 12:04 PM
Sorry I forgot to add that I know how to do the form submission part
Its just the running countdown of points and when they hit zero you cant select any more options.
If that is possible that would be great.