Reputation: 1405
I really get confused when I'm attempting to create a password input with Dojo, the following is the related code fragment:
HTML: <input id="password" type="password">
JavaScript:
var passwordInput = new ValidationTextBox({
name: "password",
}, "password");
I seems that the input with type of password doesn't work and the below is the effect sketches, which is the plaintext:
Meanwhile, I cannot find another Dojo widget can use as a password purpose, and I also don't think Dojo doesn't support it. So can anybody give me ideas on this issue?
Thnaks in advance.
Upvotes: 0
Views: 4741
Reputation: 41
You can create it by the following two ways:
1.Declarative example:
<input id="password" name="password" type="password" required="true" data-dojo-type="dijit/form/ValidationTextBox" tabindex="0" invalidMessage:'Please enter password.'">
2.Programmatic example
var password = new ValidationTextBox({
name: "password",
type: "password"
}, "password");
Upvotes: 4
Reputation: 758
Instead of ValidationTextBox use TextBox and set property type:'password'
new TextBox({
type:'password'
},'pass');
you can check it live JSFIDDLE
Upvotes: 0
Reputation: 3578
Try to use the type
param
var passwordInput = new ValidationTextBox({
type: "password"
}, "password");
Upvotes: 5