View Full Version : A problem I dont know how to solve

02-28-2012, 11:48 PM
Please Check the webpage to see what I am trying to do. I am told It cant be done in HTML. That I will have to use Java Script. Can someone Please help me out here. Go to:


If You can assist me please use the email link on my site.

The Captain

Old Pedant
02-29-2012, 12:23 AM
I don't get it.

If the only input allowed is to be those 10 buttons, then how would anybody use them to send you a message in the email form? I mean, what good is a message consisting of only digits? You expect them to look up the ASCII equivalents of the letters or something?

And, no, you can't use <input type="button"> without using JavaScript.

But in any case, that has to be the ugliest HTML code I have seen in a long time. What is the point of all those <tr> rows that do nothing?

Philip M
02-29-2012, 08:28 AM
Old Pedant - the touch numbers are supposed to be a password (not sure what it does though). There is a textarea for the actual message at the bottom of the form.

<td align="center"><input value="2" type="button" class=" Keys2" id="myform" target="myform" /></td> <!-- Col 7 -->
<td align="center"><input value="3" type="button" class=" Keys2" id="myform" target="password" /></td> <!-- Col 8 -->
<td width="20"><input value="4" type="button" class=" Keys2" id="password" target="myform" /></td> <!-- Col 9 -->
<td width="20"><input value="5" type="button" class=" Keys2" name="password" /></td> <!-- Col 10 -->
<td width="20"><input value="6" type="button" class=" Keys2" name="myform" /></td> <!-- Col 11 -->
<td width="20"><input value="7" type="button" class=" Keys2" style="target-myform:" /></td> <!-- Col 12 -->
<td width="20"><input value="8" type="button" class=" Keys2" style="target-password:" /></td> <!-- Col 13 -->
<td width="20"><input value="9" type="button" class=" Keys2" id="password" style="target:myform" /></td> <!-- Col 14 -->
<td width="20"><input value="0" type="button" class=" Keys2" id=" " style="display:myform" /></td> <!-- Col 15 -->

This seems to have been produced by some sort of generator. I am sorry to say that it is rubbish. :(

Try this:-

<html lang="en">
<title>Numeric Touchscreen</title>

<style type='text/css'>
.touch {
border:1px solid black;
#touchDiv {text-align:center;}

<script type='text/javascript'>
function addIt(cKey) {
d = document.forms["myform"].elements["textbox1"];
d.value = (cKey.value=='<') ? d.value.slice(0,-1) : d.value+cKey.value;


<div id='touchDiv'>
<input class=touch type=button value=1 onclick="addIt(this)">
<input class=touch type=button value=2 onclick="addIt(this)">
<input class=touch type=button value=3 onclick="addIt(this)">
<input class=touch type=button value=4 onclick="addIt(this)">
<input class=touch type=button value=5 onclick="addIt(this)">
<input class=touch type=button value=6 onclick="addIt(this)">
<input class=touch type=button value=7 onclick="addIt(this)">
<input class=touch type=button value=8 onclick="addIt(this)">
<input class=touch type=button value=9 onclick="addIt(this)">
<input class=touch type=button value=0 onclick="addIt(this)">
<input class=touch type=button value= " " onclick="addIt(this)">

<input type=button value="<" onclick="addIt(this)" style='width:25px' class='touch'>
<form name="myform" action"">
<input type='text' name="textbox1">

CaptHelm - Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful. Change it to "Numeric Touchscreen" or something.

“A man ceases to be a beginner in any given science and becomes a master in that science when he has
learned that he is going to be a beginner all his life.” Robin G. Collingwood (English Philosopher, 1889-1943)