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. finally i got it !!! thanks a lot!!! you really he
View Tutorial          By: maher at 2010-11-11 02:44:07

2. is it possible to change the increment variable?
View Tutorial          By: Lundi at 2013-04-08 21:21:13

3. Hi ,

Since both the methods in the

View Tutorial          By: Chintan at 2013-11-21 03:42:32

4. i am try this codeing in vb . i am using nokia n73
View Tutorial          By: kanyaraj at 2010-02-09 19:10:10

5. its very helpful and understandable.thanq
View Tutorial          By: Deepika darapaneni at 2012-03-24 14:16:39

6. Hello
I installed Android in eclipse...only

View Tutorial          By: amit kumar at 2012-01-19 11:04:55

7. realy very nice artical it give good understable
View Tutorial          By: vivek at 2009-06-19 01:27:46

8. Brief but Comprehensive. Excellent Effort.
View Tutorial          By: Farooq at 2011-11-16 14:14:52

9. i m new in java plz send some programs of java usi
View Tutorial          By: supriyo at 2009-09-02 02:03:38

10. what is self-executing program ? or dynamic data
View Tutorial          By: vasu at 2013-04-18 17:36:35