5 Answers, 1 is accepted
0
O'Man
Top achievements
Rank 1
answered on 14 Nov 2011, 01:32 PM
Hi,
You are corect! But I look the demo but not see code where combo change pasword setting for radtextBox2. Maybe default is 5 points or maybe I needs more glasses.
Thank,
Omi
You are corect! But I look the demo but not see code where combo change pasword setting for radtextBox2. Maybe default is 5 points or maybe I needs more glasses.
Thank,
Omi
0
Ray
Top achievements
Rank 1
answered on 14 Nov 2011, 11:24 PM
see CalculatingStrength procedure..
The problem is that var calculatedScore = args.get_strengthScore();
returns 5 points per char typed independent of weight setting..
Note not just limited to the demo which only updates the top boxes with changes TextBox1
0
Edward
Top achievements
Rank 1
answered on 15 Nov 2011, 10:16 AM
The scores from combos above apply only for the first two TextBoxes and not for this with calculated score.
So it will remains with the default settings. Probably the idea of the last TextBox is to show that you could calculate the score yourself and show it. You don't need to use get_strengthScore inside the CalculatingStrength function, this is only an example and they didn't want to place huge javascript in the demo I guess.
I copied the code locally from the demo and set explicitly settings for RadTextBox2. It is working correct after that.
Cheers,
ExS
So it will remains with the default settings. Probably the idea of the last TextBox is to show that you could calculate the score yourself and show it. You don't need to use get_strengthScore inside the CalculatingStrength function, this is only an example and they didn't want to place huge javascript in the demo I guess.
I copied the code locally from the demo and set explicitly settings for RadTextBox2. It is working correct after that.
Cheers,
ExS
0
Ray
Top achievements
Rank 1
answered on 15 Nov 2011, 11:04 PM
The bug with this control is in the init and java code for get_strengthScore
If you say set up the values, same as the drop boxes for textbox1, or in page_load etc.. nothing will actually happen as the above get_strengthScore function apears to use the default values same as in the demo..
If one sets these values as part fo the init/definition then the demo code will work..
Note this is only related to the get_strengthScore funtion usage the other examples will work fine.
Work around for the bug.. is to init values in aspx page..
0
O'Man
Top achievements
Rank 1
answered on 17 Nov 2011, 10:58 AM
Hi agains
I use this codes and all shots correctly:
When I enter a1B* gets 20 score from length weigh. With a1B*a score is 25 - still casing weigth not met. But after a1B*aB score go 45 coz 6 chars gets 30 and 15 from casing. Continua to a1B*aB1 go 65 -> 7 lengt = 35 + 15 casing + 15 numbers. Then a1B*aB1* equal 90, 40 for length + 15 casing + 15 numbers + 20 for symbols. And so on.
Maybe i are not right, but its works liek a rifle.
Thanks
Omi
I use this codes and all shots correctly:
<script type=
"text/javascript"
>
function
CalculatingStrength(sender, args)
{
$get(
"label1"
).innerHTML = args.get_strengthScore();
}
</script>
<asp:Label Text=
""
ID=
"label1"
runat=
"server"
/>
<telerik:RadTextBox runat=
"server"
ID=
"RadTextBox1"
>
<PasswordStrengthSettings ShowIndicator=
"true"
OnClientPasswordStrengthCalculating=
"CalculatingStrength"
/>
</telerik:RadTextBox>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
RadTextBox1.PasswordStrengthSettings.PreferredPasswordLength = 10;
RadTextBox1.PasswordStrengthSettings.MinimumLowerCaseCharacters = 2;
RadTextBox1.PasswordStrengthSettings.MinimumNumericCharacters = 2;
RadTextBox1.PasswordStrengthSettings.MinimumSymbolCharacters = 2;
RadTextBox1.PasswordStrengthSettings.MinimumUpperCaseCharacters = 2;
RadTextBox1.PasswordStrengthSettings.CalculationWeightings =
"50;15;15;20"
;
RadTextBox1.PasswordStrengthSettings.RequiresUpperAndLowerCaseCharacters =
true
;
}
}
When I enter a1B* gets 20 score from length weigh. With a1B*a score is 25 - still casing weigth not met. But after a1B*aB score go 45 coz 6 chars gets 30 and 15 from casing. Continua to a1B*aB1 go 65 -> 7 lengt = 35 + 15 casing + 15 numbers. Then a1B*aB1* equal 90, 40 for length + 15 casing + 15 numbers + 20 for symbols. And so on.
Maybe i are not right, but its works liek a rifle.
Thanks
Omi