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. it is really BEST answer of my question.
MR

View Tutorial          By: Ramesh genwa at 2010-09-09 07:15:37

2. In the above example..where you make the GC1 objec
View Tutorial          By: prasad at 2014-12-11 11:12:28

3. hiii
i m doing my final year project on sms

View Tutorial          By: jiya at 2010-10-21 07:58:24

4. hi guys.
i have downloaded the code for sen

View Tutorial          By: Tabrez Ansari at 2012-09-13 11:03:46

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

6. Dude, that LOOP wont work i cant even understand w
View Tutorial          By: Rohan at 2012-02-16 17:04:06

7. How to fetch a value from a database in dropdown b
View Tutorial          By: lara at 2014-11-19 09:02:43

8. i have created the main class to run the five clas
View Tutorial          By: Muraya at 2014-04-08 14:48:36

9. why 27's example is prone to a deadlock ? when pro
View Tutorial          By: kaka at 2011-08-14 00:59:41

10. Really nice tutorial for memset(), memcopy() and m
View Tutorial          By: Hitesh Kumar at 2012-09-03 09:16:32