Implementing prompts in text-input
- by AntonAL
Hi,
I have a form with some text-inputs: login, password.
If user sees this form the first time, input-texts should "contain" prompts, like "enter login", "enter password".
If user clicks text-input, it's prompt should disappear to allow typing.
I have seen various examples, that uses background image with prerendered text on it.
Those images are appearing with following jQuery:
$("form > :text").focus(function(){
// hide image
}).blur(function(){
// show image, if text-input is still empty
if ( $(this).val() == "" )
// show image with prompt
});
This approach has following problems:
localization is impossible
need to pre-render images for various textual prompts
overhead with loading images
How do you overcomes such a problems ?