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. Thanks for this article. Now I can understand Iter
View Tutorial          By: Rajesh Kumar at 2010-12-14 03:27:25

2. hii
i have

two varirables
View Tutorial          By: niranjan at 2012-07-31 06:47:36

3. you have extended class Abc within class Abc

View Tutorial          By: SUNIL SHAH at 2012-05-25 06:17:23

4. Hi Everyone, i tried the code. im using Micromax
View Tutorial          By: adm at 2011-09-06 12:31:18

5. it giving me error in following statment (using Li
View Tutorial          By: Priyadarsan at 2007-11-27 22:31:56

6. "I get an error returned saying the SMPT serv
View Tutorial          By: Dennis at 2011-06-24 10:18:10

7. the correct 255's binary representation is:

View Tutorial          By: SD.Plox at 2008-12-30 17:51:39

8. plz wait for your solution
View Tutorial          By: Desai Rajesh at 2010-03-11 22:00:32

9. so if you then wanted to send this gzencoded data
View Tutorial          By: Mike at 2009-03-18 12:12:28

10. Thanks ,It is very useful...
View Tutorial          By: SABARISH at 2014-08-08 05:46:43