RadTextBox Password TextMode EmptyMessage

7 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 18 Feb 2008 Link to this post

    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.
  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 19 Feb 2008 Link to this post

    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
  3. David
    David avatar
    1 posts
    Member since:
    Mar 2008

    Posted 15 Apr 2008 Link to this post

    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
  4. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 16 Apr 2008 Link to this post

    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
  5. briankb
    briankb avatar
    92 posts
    Member since:
    Feb 2004

    Posted 27 Aug 2008 Link to this post

    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?
  6. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 28 Aug 2008 Link to this post

    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.
  7. Keith
    Keith avatar
    2 posts
    Member since:
    May 2011

    Posted 31 Aug 2011 Link to this post

    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>

Back to Top