password input

I plan to display username/password fields placed inside the toolbar. Is there any way to create a passowrd input inside the toolbar?

There are two possible ways:

  1. create “Text” button and place html with password input in it:

toolbar.addText(“passwId”,0,’<input type=“password” …/>’);

  1. create Input button and change its type:

var inp = toolbar.objPull[toolbar.idPrefix+“passwId”].obj.firstChild;
var passw = inp.cloneNode(false);
passw.type = “password”;
inp.parentNode.replaceChild(passw,inp);

Here “passwId” is button id.

Hi Alexandra,

Thanks for your reply. It helped me a lot, indeed. The only thing I had to change in you code was to use “toolbar.addInput” instead of “toolbar.addTest”.

Cheers,
Rehan