ability to clear input text on activattion
Hi,
im trying to do something like this : www.tv.com (look at the search bar)
the word search disappears when clicked, and reappears if nothing is typed in the input.
i managed to make the text disappear using :
input_isb1.onControlActivated = function(event){
if (input_isb1.getControlText() == "search")
{
input_isb1.setControlText("");
}
}
but this causes problems when i want the text to reappear, because if i use :
input_isb1.onControlDeactivating = function(event){
if (input_isb1.getControlText() == "")
{
input_isb1.setControlText("search"); }
}
it will make the word "search" re-appear in the text input no matter if its empty or not. (meaning if i type something instead of leaving it empty, the word "search" will override the text i entered)
any ideas?
Thanks!!
im trying to do something like this : www.tv.com (look at the search bar)
the word search disappears when clicked, and reappears if nothing is typed in the input.
i managed to make the text disappear using :
input_isb1.onControlActivated = function(event){
if (input_isb1.getControlText() == "search")
{
input_isb1.setControlText("");
}
}
but this causes problems when i want the text to reappear, because if i use :
input_isb1.onControlDeactivating = function(event){
if (input_isb1.getControlText() == "")
{
input_isb1.setControlText("search"); }
}
it will make the word "search" re-appear in the text input no matter if its empty or not. (meaning if i type something instead of leaving it empty, the word "search" will override the text i entered)
any ideas?
Thanks!!
iceman
December 25,