How to get input to a hidden text box and submit a form?

I have an ASP.NET application designed for a Windows CE device that should receive information from a scanned barcode. The device sends scanned data as a line input with crlf to any field with focus. I set my page with a text box that takes input and sends messages to find the item.

Now I want this box not to be visible to the user, but IE complains when I set focus on it if the "visibility: hidden" or "display: none" field. I tried moving it off the screen using absolute coordinates, but setting the focus scrolls the window to a new location.

Does anyone have any suggestions to solve this problem? Thanks in advance.

+3
source share
4 answers

I sometimes hide elements

.hide{margin-left:-99999px; position:absolute;}

with css, clicking an element behind the scenes, but leaving it visible in the DOM and intact;

+5
source

Try using visibility: hidden in a div around the input field.

0
source

?

0

, .

0

Source: https://habr.com/ru/post/1763476/


All Articles