3.2.0

Important Templates : Input type password

Hi there, does anybody know how to create an input with AW that matches the behavior of the standard password HTML input : replacing chars by stars...

Cause obviously, if I start to use the widgets, then I'll use the controls on all pages, and for passwords also!!!
JeanLuc
November 30,
try
itxt=new AW.UI.Input;
....
itxt.getContent("box/text").element().type="password";
tony
November 30,
Hi tony, this seems nice to me but I get an error for the first line, and not the expected result for second line...


var UserPwd = new AW.UI.Input;
UserPwd.getContent("box/text").element().type = "password"; //1st line
UserPwd.getContent("box/text").type = "password"; //2nd line
UserPwd.setAttribute("type", "password"); //doesn't work also...
document.write(UserPwd);


Any idea?
JeanLuc
November 30,
By the way, is it the same for input type file?
JeanLuc
November 30,
JeanLuc,

here is the correct syntax:

var UserPwd = new AW.UI.Input;
UserPwd.getContent("box/text").setAttribute("type", "password");
document.write(UserPwd);
Alex (ActiveWidgets)
November 30,
sorry
document.write(itxt0);
must before
itxt0.getContent("box/text").element().type="password";


itxt0= new AW.UI.Input;
itxt0.setId("itxt0");
itxt0.setControlText("itxt0");
itxt0.setAttribute("tabIndex",1);
document.write(itxt0);
itxt0.getContent("box/text").element().focus();
itxt0.getContent("box/text").element().type="password";

tony
December 1,
On both, thanks for everything, works perfectly (once again), and for those who read the entire post, it is also working great for input type file!!!

Thxs
JeanLuc
December 1,

This topic is archived.

See also:


Back to support forum