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 need help in java
View Tutorial          By: arjun tanwar at 2010-02-17 20:58:55

2. static concept was clearly explained with some exa
View Tutorial          By: Rajkumar s ,m.p.patti,rasipuram. at 2012-03-28 16:17:31

3. can any body explain me how to execute the program
View Tutorial          By: nikhil at 2009-06-04 23:56:11

4. Hi
Thankyou for your code. Its good.

View Tutorial          By: Rajeshkumar at 2010-01-29 22:34:17

5. Nice stuff u guyzz are sharing
View Tutorial          By: kunal sharma at 2013-11-19 03:45:08

6. Hi
Gr8 work......!!!!
thanks...!!!

View Tutorial          By: Antim Jain at 2010-07-12 23:44:14

7. Very nice demo. thanks! :)
View Tutorial          By: Nikhil Gala at 2012-01-13 10:03:57

8. hello,
i have completed my bsc(computer sci

View Tutorial          By: Geeta at 2012-07-25 13:35:07

9. awesome.........
View Tutorial          By: tar at 2013-03-14 07:36:56

10. hi RAMLAK i am akankshain and getting these erro
View Tutorial          By: akanksha at 2011-12-06 10:15:47