views:

51

answers:

4

Hello all,

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.

A: 

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

erkib
A: 

Can you scan the value to a hidden field?

Brownman98
+4  A: 

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;

Caspar Kleijne
This sounds intriguing. I'll give it a shot. I didn't think to give it a negative value.
IronicMuffin
Worked like a charm!
IronicMuffin
great! good luck!
Caspar Kleijne
A: 

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

AEMLoviji