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



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. programming for java is excelent
View Tutorial          By: roldan at 2010-07-19 00:22:52

2. i have download the all 5 codes.but how can i run
View Tutorial          By: Chathu at 2011-01-30 02:28:53

3. output is not specified there.., it must should be
View Tutorial          By: yash at 2014-09-17 16:35:52

4. The code is working for me as i have included &quo
View Tutorial          By: MOHAN at 2011-06-29 04:08:04

5. hello, this code was compiled correctly, bt it wil
View Tutorial          By: anand vijay singh at 2014-05-03 12:47:24

6. your code error

because i try to ru

View Tutorial          By: Nasser at 2013-01-09 10:33:34

7. you have helped me so much! thanks a lot ya! i rea
View Tutorial          By: NATION WHITE CHIRARA at 2013-09-19 07:53:57

8. This is the best example for beginners. After read
View Tutorial          By: BB at 2014-05-20 05:24:09

9. hi, srinivas ... i too was having the same problem
View Tutorial          By: Ashish at 2009-04-07 06:57:31

10. Hi Ramlak

First of all thanks for u

View Tutorial          By: Vikas sharma at 2010-05-08 01:09:31