This is a migrated thread and some comments may be shown as answers.

RadTextBox Password TextMode EmptyMessage

6 Answers 415 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 19 Feb 2008, 01:38 AM
Hello,
I have set the empty message property for the RadTextBox but when I set the Textmode to Password the empty message does not display. Is this a bug or is this by design? Does anyone know how I can display and emptymessage within the RadTextBox control while it is using the Password Textmode?
Thank you.

6 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 19 Feb 2008, 07:15 AM
Hello Jeremy,

This is a known issue with the present version of RadInput TextBox control in IE, but it will be taken care of and the upcoming Service Pack 2 scheduled for February 25th will include the fix.

Please, excuse us for the temporary inconvenience.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 1
answered on 15 Apr 2008, 09:17 PM
Hi Konstantin,

I, too, have this problem and have to admit that the solution in Service Pack 2 was not quite what I'd hoped for.

We put messages in our input boxes to help guide people for input.  For example, "Password is required", etc.  When I put that Empty Message into a RadTextBox with Textmode on Password, I just get ******************* in the box.  I have re-created this on your website at the following web address (in IE7):

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Input/Examples/RadTextBox/FirstLook/DefaultCS.aspx

Please let me know if there is some sort of work around where I can display the message so a person can read it.

Thank you,
David
0
Konstantin Petkov
Telerik team
answered on 16 Apr 2008, 02:56 PM
Hi David,

The initial issue in this thread was a bit different and is already addressed as promised.

Your request however requires changing of the input's type attribute on the client, which is not allowed by the browsers. That said, I'm afraid there is no input control which provides such behavior.

On a side note, the "Password is required" looks like a validation error you want to display. You can use RequiredFieldValidator for this purpose:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Input/Examples/Common/Validation/DefaultCS.aspx

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
briankb
Top achievements
Rank 2
answered on 27 Aug 2008, 04:55 PM
I just uploaded version 2008.2.723.35 to our dev/live server and still have this issue.

I'm assuming the SP2 mentioned previously is included in v2008.2.723.35. Is there something else you have to do to show plain text Empty message in a password RadTextbox?
0
Konstantin Petkov
Telerik team
answered on 28 Aug 2008, 08:25 AM
Hi Briankb,

I'm afraid there is a misunderstanding here.

The initial problem in this thread, which I mentioned as resolved is that the when the EmptyMessage was set in the RadTextBox in Password mode, nothing was displayed. This is addressed with the previous release.

As I tried to explain later however, you cannot display any text (including EmptyMessage) in a password input mode. This is a browser restriction which we cannot work-around. The input type should be set to text to be able to display some text in the input (which is achieved in RadTextBox by setting the TextMode as "SingleLine" or "MultiLine" and not to "Password"). The "password" type causes the browser to display any text one sets in the well known password mode.

I hope this clears the confusion.

Best wishes,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Keith
Top achievements
Rank 1
answered on 31 Aug 2011, 05:29 PM
It'd be quite easy to work around, actually. Many control libraries (Telerik RadControls for ASP.NET AJAX included) back a single control with muliple browser elements. The way to do this would be to have a plain text input displaying the empty message, and then, on focus, hide that element, present the password element, and focus that element.

This is actually a rather serious api consistency break, and I'd like to see it addressed in a near release.

Edit: In fact, in five minutes, I put together the following example. Looking at the code rendered already by a RadTextBox, it's not difficult at all to see it rendering something similar to this given textmode=password.
<html>
<head>
<title>test</title>
</head>
<body>
 
 
<input id="passText" type="text" value="foo bar" onfocus="passOnFocus()" />
<input id="passPass" type="password" value="" style="display: none" onblur="passOnBlur()" />
 
<script type="text/javascript">
    var txt = document.getElementById('passText');
    var pas = document.getElementById('passPass');
     
    function passOnFocus() {
        txt.style.display = 'none';
        pas.style.display = 'inline';
        pas.focus();
    }
     
    function passOnBlur() {
        if(pas.value == '') {
            pas.style.display = 'none';
            txt.style.display = 'inline';
        }
    }
     
</script>
 
</body>
</html>

Tags
Input
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
David
Top achievements
Rank 1
briankb
Top achievements
Rank 2
Keith
Top achievements
Rank 1
Share this question
or