HI

You know the search bar on websites that shows some default text like "Search" and when you click on it the text disappears.

Whats the best approach to do it?

Like hard code the "search" value for example:

var val = document.getElementById('txtsearch').value;
if(val == "Search"){
//code to empty the text box
}

If yes then how do you manage when you have to work on a multi-lingual website ? You cannot hard code the value for each lang. Whats the best approach in your opinion?


THanks for your inputs.
__________________