You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dan Feldman <da...@jfrog.com> on 2014/12/21 10:48:32 UTC

Copy password field to clipboard or alternatively reveal it on button click

Hi,
I'm looking for a way to copy a password field's content to clipboard on
some button click or perhaps reveal it (meaning change from * to plaintext
- similar to what IE does with password fields).

I've searched far and wide but there doesn't seem to be one convenient way
to do this, i'd like to avoid JS etc. if possible


Thanks,

Re: Copy password field to clipboard or alternatively reveal it on button click

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

For "copy to clipboard" you may use something like
https://github.com/zeroclipboard/zeroclipboard. It uses Flash !

To "change" an input with type=password to type=text you will need to swap
it with JS. It is not allowed to change just the type.

Wicket doesn't help you with either tasks since they are both completely
client-side.

Good luck!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Dec 21, 2014 at 11:48 AM, Dan Feldman <da...@jfrog.com> wrote:

> Hi,
> I'm looking for a way to copy a password field's content to clipboard on
> some button click or perhaps reveal it (meaning change from * to plaintext
> - similar to what IE does with password fields).
>
> I've searched far and wide but there doesn't seem to be one convenient way
> to do this, i'd like to avoid JS etc. if possible
>
>
> Thanks,
>