Is there a way to display the NullText of a WebTextEditor when the TextMode="Password", but keep the characters a user is typing masked?
I have the editor defined as such: <ig:WebTextEditor ID="PasswordWebTextEditor" runat="server" TextMode="Password" NullText="Enter Password">
I want the user to see the NullText value when the focus is not on the control. Currently the control displays "************" for the NullText.
I tried changing the "type" of the editor through client focus event in a javascript function, but that did not work.
function PasswordWebTextEditor_Focus(sender, eventArgs) { sender.type = "password"; }
function PasswordWebTextEditor_Blur(sender, eventArgs) { sender.type = "text"; }
-sandor
HiI am attaching sample which implements what you are trying to achieve. Sample is tested with IE 9 and Chrome. Please let me know if you have any other questions.
Nikifor,
Thank you for the sample code. Unfortunately, it still does not work for me. After implementing it, I get the following JScript error within the Initialize event:
"Microsoft JScript runtime error: Could not get the type property. This command is not supported."
function PasswordWebTextEditor_Initialize(sender, eventArgs) {
if (ig_controls.PasswordWebTextEditor.get_value() == "") {
ig_controls.PasswordWebTextEditor.get_element().type = "text"; //<-- error="" here="" span="">
}
*** I am using Infragistics ASP.NET 11.1 controls. ***
It looks like the "type" attribute is not allowed to be modified.
When I attempt to change the object's "type" value within the Watch window of Visual Studio 2010, I get "The value could not be set. Please check your entry." message.
Also, I had to set the ClientIDMode of the password editor to "Static" for the "ig_controls.PasswordWebTextEditor" statement to work.
Trying to change the "type" value in the "Immediate" Window after breaking in the code, I get this:
?ig_controls.PasswordWebTextEditor.get_element().type = "text"
Could not get the type property. This command is not supported.
When I try
?sender.type = "text"
That works, but when I look at the value of
?ig_controls.PasswordWebTextEditor.get_element().type
it still shows "password".
Is it possible my Infragistics environment is not configured correctly??