Barcode Scanner

Discussion in 'ASP General' started by Rajani, Sep 30, 2004.

  1. Rajani

    Rajani Guest

    I have tickets printed with barcode. When i scan that code is placed in a
    text box of my form. How can i read from the scanner and put it in a specific
    text box?

    Or i directly want to insert into database. This is my actual requirement.

    I tried at many sites. I didnt get reply. I am expecting the answer here.

    Thanx in advance
    Rajani, Sep 30, 2004
    #1
    1. Advertising

  2. Rajani

    Evertjan. Guest

    =?Utf-8?B?UmFqYW5p?= wrote on 30 sep 2004 in
    microsoft.public.inetserver.asp.general:

    > I have tickets printed with barcode. When i scan that code is placed
    > in a text box of my form. How can i read from the scanner and put it
    > in a specific text box?
    >
    > Or i directly want to insert into database. This is my actual
    > requirement.
    >
    > I tried at many sites. I didnt get reply. I am expecting the answer
    > here.


    This is no website, but a usenet group, so you could be in luck.

    1 Do you want to do this on a client
    2 that runs under windows [what?XP?]
    3 [browser/wscript?}
    4 connected to the server?
    5 [via internet/lan?]
    6 and the server runs asp?
    7 what/where is the output of your barcode reader?

    The ASP part is on topic here.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress,
    but let us keep the discussions in the newsgroup)
    Evertjan., Sep 30, 2004
    #2
    1. Advertising

  3. Rajani

    Jeff Cochran Guest

    On Thu, 30 Sep 2004 04:29:03 -0700, Rajani
    <> wrote:

    >I have tickets printed with barcode. When i scan that code is placed in a
    >text box of my form. How can i read from the scanner and put it in a specific
    >text box?
    >
    >Or i directly want to insert into database. This is my actual requirement.


    You can't do that with ASP classic, it's handled client-side. As long
    as the focus is on the text input when scanned, it drops into the
    field automatically. You'd need a Submit button or to use a
    client-side submit process, such as Javascript or ActiveX input to
    send it to the server for processing into the database.

    Check client-side groups for setting the focus on a form.

    Jeff
    Jeff Cochran, Sep 30, 2004
    #3
  4. Rajani

    dlbjr Guest

    <html>
    <head>
    <title>BARCODE SCAN</title>
    </head>
    <body onload="form1.barcode.focus();">
    <form action="myself.asp" method="post" name="form1">
    <input type="text" id="barcode" name="barcode"
    size="15" maxlength="15" onchange="submit();">
    </form>
    </body>
    </html>

    'dlbjr
    'Pleading sagacious indoctrination!
    dlbjr, Sep 30, 2004
    #4
  5. Rajani

    Rajani Guest

    Hello,

    Thak you all for replying. Yes, i want to run it in intranet site using
    ASP. Yea, once it is scanned, i want to split into different parts(job,
    empid, operation_no)
    and placed in the corr form fields. Then i click submit button to insert
    into database.
    Here, i want to save time for data entry. Means, i dont want to click submit
    button for every code scanned. After i scan all the codes then i click
    submit. How can i generate form which is filled with scanned barcode. Like
    grid.

    Thanx again


    "dlbjr" wrote:

    > <html>
    > <head>
    > <title>BARCODE SCAN</title>
    > </head>
    > <body onload="form1.barcode.focus();">
    > <form action="myself.asp" method="post" name="form1">
    > <input type="text" id="barcode" name="barcode"
    > size="15" maxlength="15" onchange="submit();">
    > </form>
    > </body>
    > </html>
    >
    > 'dlbjr
    > 'Pleading sagacious indoctrination!
    >
    >
    >
    Rajani, Oct 1, 2004
    #5
  6. Rajani

    dlbjr Guest

    <html>
    <head>
    <script language="javascript">
    var strlist = "";

    function addBarcode(){
    if(strlist.length > 1){
    strlist = strlist + ",";
    }
    strlist = strlist + form1.barcode.value;
    form1.barcode.value = "";
    list.innerHTML = strlist;
    }

    function kH(e) {
    var pK = document.all? window.event.keyCode:e.which;
    if(pK != 13){
    return pK != 13;
    }
    else{
    addBarcode();
    setFocus();
    return pK != 13;
    }
    }
    document.onkeypress = kH;
    if (document.layers) document.captureEvents(Event.KEYPRESS);

    function setFocus(){
    form1.barcode.focus();
    }
    </script>
    <title>BARCODE SCAN</title>
    </head>
    <body onload="setFocus();">
    <form action="" method="post" name="form1" id="Form1">
    <input type="text" id="barcode" name="barcode"
    size="15" maxlength="15" onchange="addBarcode();" onblur="setFocus();">
    <input type="submit" value="Submit">
    <input type="hidden" id="bclist" name="bclist"value="">
    <div id="list" width="400"></div>
    </form>
    </body>
    </html>

    --
    'dlbjr
    'Pleading sagacious indoctrination!
    dlbjr, Oct 1, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    1,609
    tehka
    Sep 5, 2006
  2. mickyblu
    Replies:
    0
    Views:
    461
    mickyblu
    Jul 6, 2006
  3. Benji York
    Replies:
    0
    Views:
    718
    Benji York
    Oct 11, 2005
  4. Replies:
    2
    Views:
    744
  5. inga2005
    Replies:
    1
    Views:
    502
    Louis Somers
    Sep 23, 2008
Loading...

Share This Page