Pre-populating a password field

  • Thread starter Thread starter MattB
  • Start date Start date
M

MattB

I have a page where a person can edit their account information and one
of the things to edit is a password. I'd like to be able to pre-populate
this field with something to indicate they have one already, but when I
put something like this in the page load:

password.text = "xxxxxx"

The box still loads with nothing in it. I'd really like to have those
password mask dots in there instead of nothing to indicate there is an
existing password. Can this be done? Any suggestions?

Thanks!

Matt
 
Yes, this is a security feature, since otherwise the password would be in
plain HTML, which isn't so secure.

You can write javascript to populate the field. This would require you
emitting your own javascript to set the 'value' of the HTML element. This
would of course also result in the password being in plain text in the HTML.
 
True, unless I just use a dummy value to indicate there's something
there (which was my plan).

Thanks. I was afraid it would be a javascript thing. For now I think
I'll just leave it as-is because I don't feel like kludging it like that.

Thanks for the response!

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top