开发者

How do I receive input to a hidden textbox and submit a form?

I have an ASP.NET application designed for a Windows CE device that needs to take in information from a scanned barcode. The device sends the scanned data as string input with a crlf to whatever field has focus. I set up my page with a textbox that takes the input and posts back to look up the item.

开发者_运维问答Now, I'd like that box to not be visible to the user, but IE complains when I set focus to it if the field is "visibility: hidden" or "display: none". I've tried moving it off screen using absolute coordinates, but setting the focus scrolls the window to the new location.

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


I sometimes hide items by

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

with css, pushing the element off-screen but leaves it's visibility in the DOM and position intact;


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


Can you scan the value to a hidden field?


If u don't want to show this textbox to user then use hidden field.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜