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. Hi puru, The syntax is substring(int startIndex, i
View Tutorial          By: Fazal at 2008-09-12 20:17:53

2. an excellentttttttt siteee
View Tutorial          By: raza at 2011-04-02 10:39:46

3. i like java language.
View Tutorial          By: deepika at 2014-09-22 15:11:39

4. I copied the same program for execution...

View Tutorial          By: Anusha at 2014-05-14 14:24:19

5. i want to knew about byte datatype. why did not by
View Tutorial          By: pankaj kr tiwari at 2011-12-02 04:37:43

6. more daitlled coding for me
View Tutorial          By: fred at 2008-07-15 05:56:49

7. thats good
View Tutorial          By: P.Kumar at 2009-08-02 10:48:48

8. nice///
View Tutorial          By: MHARLON ALADEN at 2009-08-14 01:00:09

9. not good not bad...............
View Tutorial          By: mahesh at 2010-10-05 00:45:54

10. Thanks a lot for this very fruitful and amazingly
View Tutorial          By: Gaurav Saxna at 2011-06-15 06:20:18