you can do like this....using jquery .....
by using below function we can show and hide two different inputs. You need set one with ID Password and another with ID PasswordDummy, For clients with no javascript, best to set PasswordDummy to display:none initially.
$(‘input’).each(function()
{
if (this.id == ‘Password’) {
// Handle Password differently – it only gets an onblur, in which it gies invisible and activates the PasswordDummy if it is empty
// if its blank, make it invisible and Dummy visible
if (this.value == ”)
{
$(this).hide();
$(“#PasswordDummy”).show();
}
else
{
$(this).show();
$(“#PasswordDummy”).hide();
}
$(this).blur(function()
{
if (this.value == ”) {
$(this).hide();
$(“#PasswordDummy”).show();
}
else
{
$(this).show();
$(“#PasswordDummy”).hide();
}
});
}
else if (this.id == ‘PasswordDummy’) {
// Handle Password Dummy differently
this.value = $(this).attr(‘title’);
$(this).addClass(‘text-label’);
$(this).focus(function()
{
$(this).hide();
$(“#Password”).show();
$(“#Password”).focus(); });
}
else if ($(this).attr(‘title’) != undefined)
{
if (this.value == ”)
{
this.value = $(this).attr(‘title’);
$(this).addClass(‘text-label’);
}
$(this).focus(function()
{
if (this.value == $(this).attr(‘title’)) {
this.value = ”;
$(this).removeClass(‘text-label’);
}});
$(this).blur(function()
{
if (this.value == ”) {
this.value = $(this).attr(‘title’);
$(this).addClass(‘text-label’);
}});
}
});