U can use a work around with
document.forms(0).submit() in javascript
That will do a PostBack server-side
for branching, you can use a hidden
document.forms(0).hidField.value="ScanIsOk"
and server side
if request.form("hidField")="ScanIsOk" then....
wrote:
> I'm using JavaScript to capture a keypress in my web form. Right now
> all it does is post an alert message box. Is there a way to have it
> call a function in my VB code behind? All I really want to do is open
> another web form when a certain key is pressed. I guess I'd also like
> to be able to give focus to a specific textbox on the page when a key
> is pressed.
>
> In case you're wondering why... I am scanning in most of my values and
> each barcode is prefixed according to the field it goes in, so when
> "a123" is scanned, it will get put into a certain field no matter where
> the cursor is on the page, and when "b123" is scanned, that will get
> put into a certain field and so on.
>
> Any suggestions would be appreciated. Thanks.