wood burning stoves 2.0*
The moose likes JSF and the fly likes onClick() to clear text field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "onClick() to clear text field" Watch "onClick() to clear text field" New topic
Author

onClick() to clear text field

Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
I have a text field with a default value. I would like to be able to clear out the result of the text field when using onClick() depending on whether the value of the default or not. If the value were the default, I would like it to be cleared. How can I accomplish this? Thanks in advance.


Never be satisfied with anything less than the best and you will surely pass the test...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: onClick() to clear text field
 
Similar Threads
Change value in form onClick
please help me
update only 5th incrementt value into databse
Form value is not clearing on HTML Reset
Form value is not clearing on HTML Reset