FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
This week's book giveaway is in the
Cloud/Virtualization
forum.
We're giving away four copies of
Mastering Corda: Blockchain for Java Developers
and have Jamiel Sheikh on-line!
See
this thread
for details.
Win a copy of
Mastering Corda: Blockchain for Java Developers
this week in the
Cloud/Virtualization
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Bear Bibeault
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
Tim Cooke
Junilu Lacar
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Jj Roberts
Carey Brown
Bartenders:
salvin francis
Frits Walraven
Piet Souris
Forum:
JSF
Textbox value removal
Nipun Bahr
Ranch Hand
Posts: 55
I like...
posted 9 years ago
Hi All,
I want a textbox value to be erased as soon as user erases some other textbox value?
Rajkamal Pillai
Ranch Hand
Posts: 451
1
I like...
posted 9 years ago
Use script to fetch the textfield element. In
java
script, use document.getElementById("textfield-ID"); or document.form-name.textfield-name.
And
textfield.value = "";
Cheers,
Raj.
Nipun Bahr
Ranch Hand
Posts: 55
I like...
posted 9 years ago
Hi Raj,
On which event of textbox we need to call this java script?
Rajkamal Pillai
Ranch Hand
Posts: 451
1
I like...
posted 9 years ago
Yes you have to do this using some client side script (eg Javascript).
You could capture the keypress event and check if the value in the first text box has been erased. Then clear the value in the second text box too.
Check the events generated by the textfield HTML element and call the script function for the most suitable one.
Cheers,
Raj.
Nipun Bahr
Ranch Hand
Posts: 55
I like...
posted 9 years ago
Thanks Raj Its working for me now.
I applied it on onkeyup event of textbox.
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to force setter in jsf??
parse integer value in GWT
NumberFormatException while inserting data into database
Problem in integrating Single GWt Textboxs in jsp
Select Object error
More...