ASPxTextBox wih NullText loses value when browser window loses focus - asp.net

I have an ASPxTextBox with a NullText. It is used for a user name. Some users are copying their user name from the registration email into this text box. When they do it via right click and the context menu and go back to their email client to copy the password, the text box gets emptied, i. e. NullText is displayed.
I can reproduce this. However, when using Ctrl+V to paste the user name, it is persistent.
It seems to me that the ASPxTextBox is looking for a keydown event or something similar to decide if the text has changed.
How can I make the text persistent in all cases?

It seems that this behavior is a side effect of the browser/form AutoComplete feature.
Can you try to reproduce this issue with a regular with the placeholder attribute (HTML5)?
If the behavior is the same, see this thread.

I am working around this issue with this jquery plugin:
https://github.com/mathiasbynens/jquery-placeholder

Related

NVDA Screenreader - use Shortcuts to read out next item with current focus on textinputfield

Just as the title says.
I cant find ANYTHING for this particular usecase Online.
This is in context of a website aiming to be AA WCAG 2.0 conform.
I have non-focussable text alongside focussable textinputs inside of a single view.
I can TAB through the focussable textinputs, but I cant read out the textfields inbetween. When I press "arrow down" while having the focus on the textinput I get "empty field" from NVDA. Most shortcuts also unfortunately produce text in the textinputfield instead of executing the associated behavior in NVDA.
Is there any way have the keystrokes being recognized as commands instead of input for the textfield? Is there any keyboard shortcut telling NVDA to behave like this?
Under the hood, NVDA auto switches to Forms mode, so what you're getting is the correct behaviour. if that text is related to the field, then you should use aria-describedby="[id of text]", on the form element.
I wouldn't be looking at anything that changes the default behaviour of how it works, as this will undoubtedly cause issues, for end users.
Could you not put that text in a tooltip, that is only shown when a user tabs to an interactive icon, next to the input (using the aria-describedby attribute too)?

Visual indication for inline buttons

Is there a way to show some visual indication that the inline button has been pressed in telegram bot.
I have a bit which send inline keyboard, and when I press each buttons it works perfectly fine, but there is a slight delay in getting response from the server. As there is no visual indication to show if a button has been pressed, it is confusing for uses to know if the button was pressed and end up pressing the same button several times.
there are different types of inline buttons in Telegram:
Opens URL (with url).
Forward a message (with switch_inline_query).
Insert query at the chat (with switch_inline_query_current_chat).
Button with action (with callback_data).
I suppose you are refering to the last type of button, in that case, if a user press a button you will get the callback_data via CallbackQuery, and that lets you modify the original message with editMessageText to add something like:
Button TEST pressed.
As an alternative way, after you got the callback response at your server, you can use Emoji for showing feedback to your users. Just edit the inline message and edit some relative emoji to the button text.

Use Page Items in a Button Link in Apex Express

i have a little problem. I'm using Oracle Applicarion Express and i'm trying to use some page items in a Link created for a button. I created the Button as region button, and selected in the region" Action when button clicked" "Redirect to URL". In this URL i want to use two pageitems. I tried already to use them mit ":PAGE_ITEM" or "&PAGE_ITEM." but non way works. Can someone help me please?
What does the resulting hyperlink look like? The chance is great that it looks like
f?p=<app_id>:10:<session id>::::P10_ITEM1,P10_ITEM2:,
This is because when using the substitution syntax like &PAGE_ITEM. will put the session state of the referenced item in the string. Since the button is rendered during the loading of the page it will use the session state of the item at that time.
When you then fill in a value for PAGE_ITEM, this will not change the session state of that item - and even if it did it would not matter since the button was already rendered.
If this is the case then you'd better have the button submit the page, and define an on submit before validations/computations branch to act on that button. In the branch you can then safely use the session state of the required items.

ASP.NET FileUpload - How to change the language of the "Browse..." button description?

I know the very similar question was posted here already (How to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls)) and I understand it's not possible to change the description to some custom text, but isn't it at least possible to change it to a different language (e.g. to English)?
I'd like to do it so that my web page is whole in one language (because e.g. "Procházet..." instead of "Browse..." in the middle of English web page looks kind of weird to me).
This is determined at the browser level, unless you moved to something like a flash-based uploader (or <iframe> trickery), you can't customize it. Whatever language/localization the user's browser is in (usually based on the OS setting), that's the language they'll get on the "Browse..." button.
If your page is for consumers likely already in that language, then you're all set, the default behavior works. If people with another language setting come by, well...that's the language they picked, so it should be an intuitive button label, even if it doesn't match.
Although there is direct way to change the Caption of InputFile control,but you can always go for alternative way,
Add InputFile control to you page let's say "fileUpload" and make it Hidden or invisible.
Add new HTMLButton on form with Text Whatever you wanted to give it to your fileupload button (in addition you can also add TextBox too to show uploaded file name when events being gets handle at server side).
Onclick even of above button use below javascript
document.getElementById("fileUpload").click();
It will do the same thing without showing up default InputFile control.
No, it's a matter of client's operating system.

ASP.NET Hide Length of Password During Entry

I have to hide the length of the password being entered during login of my asp.net web application. I know the asp.net textbox server control has the textmode of password but I can't even show the that. Any suggestions on how to hide the user input?
<input type="password" name="password" style="color:White;"/>
seems close to your requirement but some browsers highlight input fields with yellow when you are in them. Setting the font size to 1px is another trick you could try.
But easiest might be to instead use z-index to put an image or colored DIV on top of the password field. Maybe an animated gif with a line of * characters that grows and shrinks randomly would be best - would totally confuse onlookers! :-)
How the user even knows the field is selected is another issue you'll have, maybe some extra javascript to detect and tell them that.
If you must (which I agree with #Ando that you shouldn't due to UI issues), I would use javascript (onkeydown) to copy each character to a hidden input field, and remove the key entered in the box.
This would allow you to retrieve the password on postback, while keeping the input field empty for the user.
Of course, if the user presses arrow keys, delete or backspace, you would have to decide how to handle that.
Hiding the length of the input seems like a really really bad UI idea from the users perspective, and you should argue that the specification should be changed.
While, I also agree with everyone else that is a bad idea I understand that some times you have to do things you disagree with.
I would have suggested what Mikael did but he already did it. :)
To recap:
I would use javascript (onkeydown) to
copy each character to a hidden input
field, and remove the key entered in
the box.
This would allow you to retrieve the
password on postback, while keeping
the input field empty for the user.
Of course, if the user presses arrow
keys, delete or backspace, you would
have to decide how to handle that.
You've said:
My issue with using Javascript and
storing in a hidden field is the user
viewing the source of the page and
seeing it.
I'm pretty sure that viewing the source should only show you what was originally downloaded not what the user has entered. However, there are tools (i.e. firefox addons) that can do this. You could store the value in a javascript varible and only put the password in the hidden field when it is posted or use some sore of ajax request to authenticate. However, With the right addons someone could find this as well.
If the issue is someone looking over the shoulder of the person logging in then these concerns (i.e. viewing source) won't matter unless the person who is logging in decides to view the source and show the person in which case it would just be easier for him to tell the other person his password.
Agreeing that its not the best idea...
1) When you start typing, on each key press, restrict a specific character from being entred as part of a password (eg pipe) then when the user types, add a ramdom number of pipes (eg between 0 and 4 pipes) then just remove these server-side?
2) Add these to a hidden field...if the user does a View_Source, they will only see the original value of the field, ie will be empty...just remember to clear the value if you need to depending on how its rendered (asp.net webform hidden field control) etc
3) Have 2 password boxes that need 2 passwords (just as bad an idea)
I confirmed the requirement with a security officer and apparently I miss read the requirement. However, I have seen Windows based applicatiosn perform this. The cursor moves on each key stroke but no star, asterik or bar is used. Thanks to everyone for theie suggestions and comments.

Resources