We help IT Professionals succeed at work.

I am creating a touch screen javascript keyboard and am having problems with the backspace button

pinsah
pinsah asked
on
720 Views
Last Modified: 2011-09-20
This is a shorted verison of the jarvascript:

<script Language="Javascript">
<!--
function a()
{
var text=document.form.text.value
document.form.text.value=text + "a";
}
function b()
{
var text=document.form.text.value
document.form.text.value=text + "b";
}
function c()
{
var text=document.form.text.value
document.form.text.value=text + "c";
}
function space()
{
var text=document.form.text.value
document.form.text.value=text + " ";
}
function at()
{
var text=document.form.text.value
document.form.text.value=text + "@";
}
function under()
{
var text=document.form.text.value
document.form.text.value=text + "_";
}
function dash()
{
var text=document.form.text.value
document.form.text.value=text + "-";
}
function dot()
{
var text=document.form.text.value
document.form.text.value=text + ".";
}
function one()
{
var text=document.form.text.value
document.form.text.value=text + "1";
}
function two()
{
var text=document.form.text.value
document.form.text.value=text + "2";
}
function three()
{
var text=document.form.text.value
document.form.text.value=text + "3";
}
function reset()
{
document.form.text.value="";
}

// -->
</SCRIPT>

An example of one of my buttons:
<a href="Javascript:;" onClick=one()><img src="keyboard/1.jpg" width="71" height="71" hspace="2" vspace="0" border="0">

Please does anyone know what to put in the javascrip to clear one character (back space key)

Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.