By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Barcode as input and to save in sql server

P: 1
Expand|Select|Wrap|Line Numbers
  1. <html> <head> <script language="javascript">
  2. var strlist = "";
  3.  
  4. function addBarcode(){
  5. if(strlist.length > 1){
  6. strlist = strlist + ",";
  7. }
  8. strlist = strlist + form1.barcode.value;
  9. form1.barcode.value = "";
  10. list.innerHTML = strlist;
  11. }
  12.  
  13. function kH(e) {
  14. var pK = document.all? window.event.keyCode:e.which;
  15. if(pK != 13){
  16. return pK != 13;
  17. }
  18. else{
  19. addBarcode();
  20. setFocus();
  21. return pK != 13;
  22. }
  23. }
  24. document.onkeypress = kH;
  25. if (document.layers) document.captureEvents(Event.KEYPRESS);
  26.  
  27. function setFocus(){
  28. form1.barcode.focus();
  29. }
  30. </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"
  31. 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
Jul 14 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.