PDA

View Full Version : Scapecalculator.110mb.com


Gstrobe188
April 21st, 2008, 08:29 PM
Check this out! I made this site to help form armies. Check the boxes and it will give you an army total. Click on the link and it will bring up individual character info. I only have the characters that I have loaded on the site, so far. Let me know what you think!

www.Scapecalculator.110mb.com (http://www.Scapecalculator.110mb.com)

nyys
April 21st, 2008, 09:09 PM
Link?

Sisyphus
April 21st, 2008, 09:52 PM
Check this out! I made this site to help form armies. Check the boxes and it will give you an army total. Click on the link and it will bring up individual character info. I only have the characters that I have loaded on the site, so far. Let me know what you think!

www.Scapecalculator.110mb.com (http://www.Scapecalculator.110mb.com)

Your site works fine in Internet Explorer but not when I view it in Firefox. In Firefox, I get a javascript error:total has no properties
function add(caller){ total.value = total.value*1 + caller.value*1}

Also, I warn you that all REAL scapers have all the unit costs memorized. :p

NecroBlade
April 21st, 2008, 09:54 PM
Also, I warn you that all REAL scapers have all the unit costs memorized. :p

I do not. :unsure:

Gstrobe188
May 22nd, 2008, 12:49 PM
I finally got the site updated with all the characters I have. I also moved the Army total block up to the top.

AmishBurrito
May 22nd, 2008, 01:08 PM
Neat builder. I would like to suggest that you add a function to put multiple sets in of commons (maybe a dropdown menu instead of a checkbox).

Gstrobe188
June 25th, 2008, 12:05 PM
I updated the website with the Marvel figures.

Scapemaster
June 25th, 2008, 06:59 PM
Very nice. You should add everyone soon.

Blue Dane
June 25th, 2008, 07:44 PM
When you check the boxes, where does it give you an army total?

Gstrobe188
June 26th, 2008, 12:42 PM
The point total displays at the top but it was not working, I think I have it fixed now.

Soul Shackle
June 26th, 2008, 01:10 PM
Any way to add multiple commons?

Gstrobe188
June 30th, 2008, 06:52 AM
Still trying to figure that one out.:confused:

Dragonmaster384
July 4th, 2008, 02:05 PM
Still trying to figure that one out.:confused:

I looked over your code, and I think I've solved your problem.
Have a look at this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Frame 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<form>
<body background="back.jpg" link="black" vlink="black" alink="black">
<div align="center">
<input name="total" type="text" size="10" readonly>
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="23%"><font color="#660033" size="6"><strong>Einar</strong></font></td>
<td width="21%"><font color="#999999" size="6"><strong>Jandar</strong></font></td>
<td width="18%"><font color="#009900" size="6"><strong>Ullar</strong></font></td>
<td width="22%"><font color="#FF0000" size="6"><strong>Utgar</strong></font></td>
<td width="16%"><font color="#666666" size="6"><strong>Vydar</strong></font></td>
</tr>

<td valign="top">
<p><font size="3">
<select id="0">
<option value=0>0</option>
<option value=75>1</option>
<option value=150>2</option>
<option value=225>3</option>
<option value=300>4</option>
<option value=375>5</option>
<option value=450>6</option>
<option value=525>7</option>
<option value=600>8</option>
<option value=675>9</option>
<option value=750>10</option>
<a href="Einar/10th.htm" target="leftFrame">10th Regiment of Foot </a></font></p>

<p> <font size="3">
<select id="1">
<option value=0>0</option>
<option value=60>1</option>
<a href="Einar/Isamurai.html" target="leftFrame">Izumi Samurai</a></font></p>

<p> <font size="3">
<select id="2">
<option value=0>0</option>
<option value=120>1</option>
<a href="Einar/Kaemon.html" target="leftFrame">Kaemon Awa</a></font></p>

</table>

<div align="center">
<p>&nbsp; </p>
<form name="form1" method="post" action="">
<input type="reset" name="Reset" value="Reset">
<br><br>
<input type="button" name="Update" value="Update" onClick="update(numCards)">
</form>
</div>
<script language="JavaScript" type="text/javascript">
var total = document.getElementById("total");
var numCards = 3;
function update(numCards){
total.value = calculateTotal(numCards);
}
function calculateTotal(numCards){
var points;
for (var i = 0; i <= numCards; i++)
points += document.getElementById(i);
}
</script>
</body>
</html>



This only has three units, but it serves as a guideline for the changes I suggest.

Important additions/changes are in red, notice that instead of checkboxes we now use drop-down selection boxes, I wrote new functions for calulating points totals, and added an update button.

The variable numCards is very important, it should equal the number of cards/units you have on the page.

Notice also that each select has it's own unique id, they all need to have one. When you add cards/units give each one the next available number(Example: I stopped at 2, the next should be 3, then 4, and so on). Do not skip any numbers! It will not work right then! :shock:

Well thats what I've got for now, if you don't understand it, or if there are problems with my code/examples, just say so and I will try to help! :D

Zedd
July 4th, 2008, 11:09 PM
This should be called the Scapeulator.

Yo homes Scapeulator!!

Gstrobe188
July 5th, 2008, 11:13 AM
The code looks good but I am getting an undefined message in the total block. I was also hoping to stay away from having to use a calculate button.

Scapeulator sounds good, It would save me space on the header.

Dragonmaster384
July 5th, 2008, 11:37 AM
The code looks good but I am getting an undefined message in the total block.

I'm not sure what to do about this, where exactly is the problem? :confused:


I was also hoping to stay away from having to use a calculate button.


I think you could put the function call to update(numCards) in an "onClick" for each "select" box like this:

<p> <font size="3">
<select id="2" onClick="update(numCards)">
<option value=0>0</option>
<option value=120>1</option>
<a href="Einar/Kaemon.html" target="leftFrame">Kaemon Awa</a></font></p>

Try it and see if it works.

mtheshow
July 23rd, 2008, 04:45 AM
mabe add a few more check boxes under the commons. grate job!

Gstrobe188
August 16th, 2008, 12:37 PM
I got a few more characters loaded, but I am a little behind on the pictures.