Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button click

Status
Not open for further replies.

adamdavies

Programmer
May 21, 2003
20
AU
what i have is a number of textboxes on my form.
I want first textbox to recieve the focus.
When i scan a barcode, it enters the text into the textbox and then focus goes to the next textbox.
The scanner has an carriage return at the end, so i dont want it to submit my button but go to next textbox.

I have a submit button.
I only want this to be clicked when the user actually clicks the button.
This will then update my database embedded SQL with the text from all the textboxes.


I AM USING
Private Sub SetFocus(ByVal ctrl As System.Web.UI.Control)
Dim s As String = &quot;<SCRIPT language='javascript'>document.getElementById('&quot; & ctrl.ID & &quot;').focus() </SCRIPT>&quot; RegisterStartupScript(&quot;focus&quot;, s)
End Sub

'SET FOCUS TO FIRST TEXTBOX
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim strJScript As String
strJScript = &quot;<script language='javascript'>document.Form1.PalletNumTxt.focus();</script>&quot;
Page.RegisterStartupScript(&quot;focusScript&quot;, strJScript)
End Sub


'NEXT TEXTBOX AND SO ON
Private Sub PalletTagTxt_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PalletTagTxt.TextChanged
Me.SetFocus(Me.PalletStartTxt)
End Sub

It doesnt work when i change button type from
<input type=&quot;submit&quot;
to
<input type=&quot;button&quot;

thanks
adam
 
How do you get the information scanned in your barcode reader into your web browser?! We tried something similar with a card-reader, but we had to fake it out by writing a &quot;custom browser&quot; that held that functionality and passed hte value through a connection string (very clunky).

As for your button, try adding Runat=server within your <input type=button> tag. Submit buttons will cause a postback by nature, regular buttons won't unless you tell them to.

D'Arcy
 
I am using a basic keyboard wedge scanner. Acts as if you have a keyboard attached to the PC.
Are you using RF?
Keyboard wedge can be wired or wireless.

check out for different types of keyboard wedge scanners.

Dont know if this is what you need to know.

cheers
ads
 
forgot to say, goto equipment, barcode scanning equipment, handheld scanners in the drop down menu
 
But how do you actually get the data thats scanned into the fields of the web browser?
(Sorry, should have been more clear)
:)

D
 
D'arcy,

A keyboard wedge scanner works at bios level.
In other words it does not need any software and allows you to scan information anywhere that text can be entered, any application. This is different to serial where as this is not possible.

The keyboard wedge scanner is connected to the keyboard port at the back of your PC. When you scan a barcode, the PC thinks of the scanner as a keyboard, therefor it will automatically enter the data into the textbox on the webpage.
All you do is connect the scanner, no code, no drivers. It will do all the work for you.
Hope this makes sense and this is the question you are asking me.

If you need to know anything else, ill try to help.
cheers
adam
 
Ah, ok. thanks for the details Adam.

Our card scanner is connected through the serial port, hence why we had a bugger of a time.

So...you don't have a keyboard hooked up to the machine, just the scanner? Or do you have both?

Being able to have both AND be able to get the scanned data into our app would be the ideal situation!

Thanks,

D'Arcy
 

All keyboard wedge scanners have a Y cable. One side goes into the PC and the other lets you connect a keyboard. This allows you to use the keyboard and scanner Simultaneously.

You can also have just the scanner if you want and no keyboard.

You can also do this RF, The base station acts as the keyboard wedge. This allows you to walk around the office, warehouse, etc with the scanner. (No cables)

Let us know if you need anymore help.

good luck!
adam
 
VERY kewl! We may actually be interested in that. Who makes the scanner that you're using?

Thanks for all the info!

D
 
Sweet, thanks for the links.

Question for you. I was talking to some co workers, and they actually have used the wedge scanners before. The problem they had was that since its treated as a keyboard input, you can swipe a card at any time and whatever the active window is, the text will try and be shown in it.

For example, they found that if the user had notepad open with our application, and it was the selected app, and they swiped the card, the information would appear in notepad.

have you guys tried to get around that in any way, or just telling your users that they have to be in the application when using the scanner?

Thanks again for all the info!
:)

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top