PDA

View Full Version : What am I Missing



Steve Sea
05-28-2007, 06:39 PM
Apart from the usual "sandwich short of a picnic" comment have a look at this code,
what I'm trying to achieve.

Is 3 columns of numbered buttons, the output of each column to be displayed at the bottom of the relevant column and independent of the other two.

for example pushing buttons in column two shouldn't delete or change column one and three output.

Hope this makes sense

I've (well with the help of some of the chaps on the forum) managed to get this far,
I've got it working in frames (one frame for each column of numbers)
but that don't fit in will what I'm doing, so it's all got to be on one page.

Sorry if there is some bad coding I've been trying all sorts, but still no results.

The Code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">

function showNumber(Thousum) {
obj = document.getElementById('milles').innerHTML=Thousum;
}
function showNumber(hundsum) {
obj = document.getElementById('cents').innerHTML=hundsum;
}
</script>
</head>
<body BGCOLOR="#CC9900">
<div style="position:absolute; left:80px; top:5px; width:100px; height:285px;">
<center><fieldset style="width:100px; height:285px;background-color: Black">
<Font size="3" color="Yellow"><Legend><b><u>Thousands</u></b></Legend></Font>
<form action="" name="Thousum">
<input name="Thousands" type="button" onclick="showNumber('Thousands');" value="000s"><br>
<input name="Thousands" type="button" onclick="showNumber('one Thousand');" value="1000"><br>
<input name="Thousands" type="button" onclick="showNumber('two Thousand');" value="2000"><br>
<input name="Thousands" type="button" onclick="showNumber('three Thousand');" value="3000"><br>
<input name="Thousands" type="button" onclick="showNumber('four Thousand');" value="4000"><br>
<input name="Thousands" type="button" onclick="showNumber('five Thousand');" value="5000"><br>
<input name="Thousands" type="button" onclick="showNumber('six Thousand');" value="6000"><br>
<input name="Thousands" type="button" onclick="showNumber('seven Thousand');" value="7000"><br>
<input name="Thousands" type="button" onclick="showNumber('eight Thousand');" value="8000"><br>
<input name="Thousands" type="button" onclick="showNumber('nine Thousand');" value="9000">
</Fieldset>
<input name="Clear" type="button" onclick="showNumber('');" value="Clear" style="background: Red; font-weight: bolder; color: White"><br>
</div>
</center>


<div style="position:absolute; left:62px; top:365px; width:140px; z-index:2">
<h3 id="milles" align="right"></h3>
</form>
</div>

<div style="position:absolute; left:280px; top:5px; width:100px; height:285px;">
<center><fieldset style="width:100px; height:285px;background-color: Black">
<Font size="3" color="Yellow"><Legend><b><u>Thousands</u></b></Legend></Font>
<form action="" name="hundsum">
<input name="sands" type="button" onclick="showNumber('Thousands');" value="000s"><br>
<input name="sands" type="button" onclick="showNumber('une mille');" value="1000"><br>
<input name="sands" type="button" onclick="showNumber('deux milles');" value="2000"><br>
<input name="sands" type="button" onclick="showNumber('trois milles');" value="3000"><br>
<input name="sands" type="button" onclick="showNumber('quatre milles');" value="4000"><br>
<input name="sands" type="button" onclick="showNumber('cinq milles');" value="5000"><br>
<input name="sands" type="button" onclick="showNumber('six milles');" value="6000"><br>
<input name="sands" type="button" onclick="showNumber('sept milles');" value="7000"><br>
<input name="sands" type="button" onclick="showNumber('huit milles');" value="8000"><br>
<input name="sands" type="button" onclick="showNumber('neuf milles');" value="9000">
</Fieldset>
<input name="Clear" type="button" onclick="showNumber('');" value="Clear" style="background: Red; font-weight: bolder; color: White"><br>
</div>
</center>


<div style="position:absolute; left:280px; top:365px; width:140px; z-index:2">
<h3 id="cents" align="right"></h3>
</form>
</div>



</body>
</html>



Many Thanks

Steve C.

jscheuer1
05-28-2007, 08:28 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">

function showNumber(Thousum) {
obj = document.getElementById('milles').innerHTML=Thousum;
}
function showNumber1(hundsum) {
obj = document.getElementById('cents').innerHTML=hundsum;
}
</script>
</head>
<body BGCOLOR="#CC9900">
<div style="position:absolute; left:80px; top:5px; width:100px; height:285px;">
<center><fieldset style="width:100px; height:285px;background-color: Black">
<Font size="3" color="Yellow"><Legend><b><u>Thousands</u></b></Legend></Font>
<form action="" name="Thousum">
<input name="Thousands" type="button" onclick="showNumber('Thousands');" value="000s"><br>
<input name="Thousands" type="button" onclick="showNumber('one Thousand');" value="1000"><br>
<input name="Thousands" type="button" onclick="showNumber('two Thousand');" value="2000"><br>
<input name="Thousands" type="button" onclick="showNumber('three Thousand');" value="3000"><br>
<input name="Thousands" type="button" onclick="showNumber('four Thousand');" value="4000"><br>
<input name="Thousands" type="button" onclick="showNumber('five Thousand');" value="5000"><br>
<input name="Thousands" type="button" onclick="showNumber('six Thousand');" value="6000"><br>
<input name="Thousands" type="button" onclick="showNumber('seven Thousand');" value="7000"><br>
<input name="Thousands" type="button" onclick="showNumber('eight Thousand');" value="8000"><br>
<input name="Thousands" type="button" onclick="showNumber('nine Thousand');" value="9000">
</Fieldset>
<input name="Clear" type="button" onclick="showNumber('');" value="Clear" style="background: Red; font-weight: bolder; color: White"><br>
</div>
</center>


<div style="position:absolute; left:62px; top:365px; width:140px; z-index:2">
<h3 id="milles" align="right"></h3>
</form>
</div>

<div style="position:absolute; left:280px; top:5px; width:100px; height:285px;">
<center><fieldset style="width:100px; height:285px;background-color: Black">
<Font size="3" color="Yellow"><Legend><b><u>Thousands</u></b></Legend></Font>
<form action="" name="hundsum">
<input name="sands" type="button" onclick="showNumber1('Thousands');" value="000s"><br>
<input name="sands" type="button" onclick="showNumber1('une mille');" value="1000"><br>
<input name="sands" type="button" onclick="showNumber1('deux milles');" value="2000"><br>
<input name="sands" type="button" onclick="showNumber1('trois milles');" value="3000"><br>
<input name="sands" type="button" onclick="showNumber1('quatre milles');" value="4000"><br>
<input name="sands" type="button" onclick="showNumber1('cinq milles');" value="5000"><br>
<input name="sands" type="button" onclick="showNumber1('six milles');" value="6000"><br>
<input name="sands" type="button" onclick="showNumber1('sept milles');" value="7000"><br>
<input name="sands" type="button" onclick="showNumber1('huit milles');" value="8000"><br>
<input name="sands" type="button" onclick="showNumber1('neuf milles');" value="9000">
</Fieldset>
<input name="Clear" type="button" onclick="showNumber1('');" value="Clear" style="background: Red; font-weight: bolder; color: White"><br>
</div>
</center>


<div style="position:absolute; left:280px; top:365px; width:140px; z-index:2">
<h3 id="cents" align="right"></h3>
</form>
</div>



</body>
</html>

Steve Sea
05-29-2007, 06:18 PM
John
I see where I was going wrong by not numbering the "showNumber1" what a dim bat,
Anyway lots of thanks to you,

Best Regards

Steve C.