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. I have use the above code, Am getting the below er
View Tutorial          By: RameshKumar at 2011-07-25 05:02:12

2. I hope so.:d
View Tutorial          By: khoa at 2008-06-10 04:18:31

3. can anyone tell how to send sms in asp.net using p
View Tutorial          By: dubail at 2013-04-06 14:17:44

4. This is very useful article with clear understandi
View Tutorial          By: Manu Manker at 2014-03-14 05:49:26

5. very useful. Thx
View Tutorial          By: reddy at 2015-05-07 09:58:19

6. Thanks. A couple of typos, though:
- &quo

View Tutorial          By: Steve Parker at 2013-09-25 09:47:08

7. can i have sample of java programming that has dat
View Tutorial          By: piolo at 2009-05-31 18:53:25

8. how we can store a pdf file into database

View Tutorial          By: neelima at 2010-03-10 23:46:52

9. Hey nice article Brian W. Kernighan and/or Dennis
View Tutorial          By: butt at 2013-01-17 07:12:21

10. how to run this code....... Please tell somebody m
View Tutorial          By: Honey at 2015-01-24 14:27:38