Barcode as input and to save in sql server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthi6230
    New Member
    • Jul 2014
    • 1

    Barcode as input and to save in sql server

    Code:
    <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="http://bytes.com/" 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>
    This is the code to read number of barcode data in a single text box one ny one and view in the same form itself but i dont know how to save to mssql server using asp script can any help me plese
    Last edited by Rabbit; Jul 14 '14, 03:48 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...