Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

May I know if it is possible to query InfoPath 2007 web-based form via a bar code scanner.

Scenario
I have a bar code scanner and a web-based InfoPath form. The InfoPath form contain one section for query data based on a text field (let's name this text field as 'Query'). So, when the bar code scanner scan the bar code of a piece of paper, it will be enter into the 'Query' text field and the result will appear.

share|improve this question

2 Answers 2

If the barcode scanner works just by faking keyboard entry of the numbers and then simulating a press of the enter button, then you can simply make sure that the input field has focus when the page loads.

document.getElementById('Query').focus();

Put that bit of javascript at the end of the page content and it should work as you expect.

If it doesn't simulate a press of the enter button, then you should set an event on the textbox's onchange event or something similar (maybe set a timer) and check whether input has been entered into the query field. Once there is data in the field, submit the form.

share|improve this answer
    
May i know what you meant by at the end of the page content? –  Wilson Tan Sep 23 '11 at 8:23
    
I mean that you'd write that javascript somewhere near the bottom of the page. Preferably just before the </body> html tag. Really though, it would be fine anywhere after the query textbox. If you write it before, it will error because at the point when it's running the textbox doesn't exist :) –  soniiic Sep 23 '11 at 9:56
up vote 0 down vote accepted

Actually, I found another work around.

I select the text field box and use the bar code scanner to scan the bar code and input the value into the text field box.

Then, I click a button label 'Query' and it will display all the data related to that bar code value.

share|improve this answer
    
pls Wilson can you explain better teh way you did this? What happens when you click the button? How you activate the barcode scanner? –  user6079 Dec 18 '11 at 18:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.