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
- Data Science
- React Native
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Read a file having a list of telnet commands and execute them one by one using Java
Open a .docx file and show content in a TextArea using Java
Step by Step guide to setup freetts for Java
Of Object, equals (), == and hashCode ()
Using the AWS SDK for Java in Eclipse
DateFormat sample program in Java
concurrent.Flow instead of Observable class in Java
Calculator application in Java
Sending Email from Java application (using gmail)