Comment on Tutorial - Click to remove an element from a select html form using javascript By Emiley J.



Comment Added by : Tom Theriault

Comment Added at : 2010-12-14 14:54:09

Comment on Tutorial : Click to remove an element from a select html form using javascript By Emiley J.
Hi,

I am new to html, and javascript.

I've built a form, with one field with a click of a character A-Z and/or 0-9 will passit to my field in my form.

I am using a simple javascirpt passit function.

I am also wanting to delete the last character.

But I can not find a simple function that will allow me to delete the last character as I click on a character I would like to click and delete just as easily.

Here is my passit function:

function passit(str)
{document.plate.plateinput.value+=str}

I copied the same function and changed the name and used a minus instead of a plus in front of the equal sign but it didn't work:

function clearit(str)
{document.plate.plateinput.value-=str}

Can you help me here.

I've assigne this " <- " on my form to the javascript "clearit" so every time I click on " <- " I want to delete the last character in my field.

Thank you.

Tom :-)

Snozzle's Car Washes
410.456.0177


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. it should be:
/* --------------- */

View Tutorial          By: Ryba at 2010-05-19 15:45:48

2. There is better way to fix this problem..
<

View Tutorial          By: Sundara Kaku at 2011-07-23 10:38:52

3. I tried this code,but is showing this error

View Tutorial          By: anju at 2009-05-22 07:42:11

4. That's a very nice and simple article,
Tha

View Tutorial          By: Mohsen at 2009-10-11 03:07:18

5. Hi guys
i am a beginer in java.. pls help

View Tutorial          By: Jeevan at 2009-12-19 09:35:06

6. nice explanation.I want to write contents of file
View Tutorial          By: aparna at 2013-02-05 13:17:36

7. simple but very usefull example, thanks a lot
View Tutorial          By: yiyo at 2011-12-01 15:18:43

8. Good one
View Tutorial          By: Soumya Anoop at 2010-05-13 23:23:44

9. good example tnq...........
View Tutorial          By: SaidiReddy at 2012-06-09 12:03:09

10. Hi,
I want to run a bat file, below are the

View Tutorial          By: Rajshekar at 2011-10-28 06:07:06