Yeah, something like that although it doesn't seem to work in IE. The
behavior is exactly what I need in Firefox, however.

Thanks

Matt

----- Original Message -----
From: Greg Stewart <[EMAIL PROTECTED]>
Date: Fri, 2 Jul 2004 09:58:59 +0100
Subject: Re: sot: login box
To: CF-Talk <[EMAIL PROTECTED]>

Were you after something like this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<script>

function changeType(f) {

alert(f);

f.type = "password";

}

</script>

</head>

<body>

<form>

<input type="text" name="r_name" id="r_name" value="your password"

size="20" changeType(this);" />

</form>

</body>

</html>

Cheers

G


On Thu, 1 Jul 2004 12:45:22 -0400, Matthew Fusfield <[EMAIL PROTECTED]> wrote:

>

> I've done this before once or twice, but for the life of me can't

> figure out how or where, so here goes:

>

> I'd like to display some text in an input type="password" box for a

> login form. Once the user begins to type in their password, it should

> revert to the normal behavior of replacing the text with stars.

>

> In other words, right now I have a form where the value of the

> username field is "username" and the value of the password field is

> "password" This second field, though, shows up as stars as it is a

> password field. I have some _javascript_ that clears the value of the

> username field onFocus so the user can enter their username. I'd like

> to do the same with the password field.

>

> I have some gmail invites left if anyone is interested and can help me

> jog my memory :-)

>

> Thanks,

>

> Matt

>

>________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to