I\'m using jQuery to make the inline labels
Check out the code below. Just append addPassClear("Password")
to any input element that you want this functionality for.
$(function() {
$.fn.addPassClear =
function(text)
{
return $(this).each(
function()
{
$(this).focus(function(event){$(this).passFocusize(text); $(this).select(); });
$(this).blur(function(event){$(this).passBlurize(text); });
});
}
$.fn.passFocusize =
function(text)
{
return $(this).each(
function()
{
if ($(this).val()==text && $(this).attr("type")=="text")
{
$(this).val("");
this.type="password";
}
});
};
$.fn.passBlurize =
function(text)
{
return $(this).each(
function()
{
if ($(this).val()=="")
{
$(this).val(text);
this.type="text";
}
});
};
};