:: Forum >>

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
Wednesday, November 30, 2005
try
itxt=new AW.UI.Input;
....
itxt.getContent("box/text").element().type="password";
tony
Wednesday, November 30, 2005
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
Wednesday, November 30, 2005
By the way, is it the same for input type file?
JeanLuc
Wednesday, November 30, 2005
JeanLuc,

here is the correct syntax:

var UserPwd = new AW.UI.Input;
UserPwd.getContent("box/text").setAttribute("type", "password");
document.write(UserPwd);
Alex (ActiveWidgets)
Wednesday, November 30, 2005
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
Thursday, December 1, 2005
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
Thursday, December 1, 2005

This topic is archived.


Back to support forum

Forum search