Kapil Lavangade
Top achievements
Rank 1
Kapil Lavangade
asked on 02 Dec 2009, 01:52 PM
Hello All,
I want to set textmode of RadTextBox to 'Password' through JavaScript ,I can successfully do it on server side ,but on client side ,I fail to do the same.Please help me out for this.
Thanks,
Kapil Lavangade.
I want to set textmode of RadTextBox to 'Password' through JavaScript ,I can successfully do it on server side ,but on client side ,I fail to do the same.Please help me out for this.
Thanks,
Kapil Lavangade.
5 Answers, 1 is accepted
0
Hello Kapil,
Such a functionality is not supported by RadTextBox (or asp:TextBox), because it requires switching the "type" property of the textbox element and browsers do not allow this. Use an AJAX request to swtich the TextMode server-side.
All the best,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Such a functionality is not supported by RadTextBox (or asp:TextBox), because it requires switching the "type" property of the textbox element and browsers do not allow this. Use an AJAX request to swtich the TextMode server-side.
All the best,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Erik
Top achievements
Rank 2
answered on 09 Apr 2013, 07:16 PM
Hi all,
Found a working solution.
This example show the password on focus, but you can use it in other ways to of course (via a checkbox "show password" ie)
Erik
Found a working solution.
This example show the password on focus, but you can use it in other ways to of course (via a checkbox "show password" ie)
<
telerik:RadTextbox
ID
=
"rnt_User_Password"
TextMode
=
"Password"
runat
=
"server"
/>
txt_User_Password.Attributes.Add(
"onfocus"
,
"this.type='text';"
)
txt_User_Password.Attributes.Add(
"onblur"
,
"this.type='password';"
)
Erik
0
Hello Erik,
This will work in most browsers, but not in older IE like 6 and 7. So use it if you are sure that your site is browsed in modern browsers.
Greetings,
Vasil
the Telerik team
This will work in most browsers, but not in older IE like 6 and 7. So use it if you are sure that your site is browsed in modern browsers.
Greetings,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 10 Apr 2013, 01:16 PM
ok, thanks Vasil. (I'm done with IE<=7 :-) )
0
t
Top achievements
Rank 1
answered on 11 Jul 2014, 02:21 PM
Thanks Erik