Connecting Tech Pros Worldwide Forums | Help | Site Map

How to Clear a textbox when clicked inside

Newbie
 
Join Date: Nov 2006
Posts: 2
#1: Dec 7 '06
Hi, I am new in coldfusion. I would be glad if you guys can help. I want my page to load and inside the search button i want the word "SEARCH" to happen. But when the user clicked to search for items the word "SEARCH" should be cleared from the text box so the user can search more like and event I need that for click when the mouse is been click inside the mouse of when the tab key send the focus inside the text box. Thanks

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Dec 26 '06

re: How to Clear a textbox when clicked inside


Quote:

Originally Posted by jamesonworld

Hi, I am new in coldfusion. I would be glad if you guys can help. I want my page to load and inside the search button i want the word "SEARCH" to happen. But when the user clicked to search for items the word "SEARCH" should be cleared from the text box so the user can search more like and event I need that for click when the mouse is been click inside the mouse of when the tab key send the focus inside the text box. Thanks

This is not a coldfusion problem, but a javascript one. just add a onfocus handler to the textbox which sets the value to empty string.
Reply