Results 1 to 3 of 3

Thread: Using barcode input data to textbox and move to second textbox the focus

  1. #1
    Join Date
    Sep 2010
    Posts
    188

    Using barcode input data to textbox and move to second textbox the focus

    Hi..

    I have form and i want to input data using barcode and it will display on textbox and after input on the first textbox the focus will go to next textbox untill it will go on the last textbox and on the last textbox it will automatically save the data's on the database.

    How is it possible?

    here is my sample code:

    Code:
    <?php
        error_reporting(0);
       date_default_timezone_set("Asia/Singapore"); //set the time zone  
    $con = mysql_connect('localhost', 'root','');
    
    if (!$con) {
        echo 'failed';
        die();
    }
    mysql_select_db("mes", $con);
    ?>
    
    <html>
    <head>
    <script type="text/javascript">
    function ini()
    {
    
    // Retrieve the code
    var code =document.getElementById ("code_read_box1").value;
    var code =document.getElementById ("code_read_box2").value;
    var code =document.getElementById ("code_read_box3").value;
    var code =document.getElementById ("code_read_box4").value;
    var code =document.getElementById ("code_read_box5").value;
    var code =document.getElementById ("code_read_box6").value;
    // Return false to prevent the form to submit
    return false;
    
    }
    
    </script>
    </head>
    <body onLoad="document.barcode.code_read_box1.focus()">
    
    <form name=barcode onsubmit = "return ini()">
    
    <input type="text" id="code_read_box1" value="" /><br/>
    <input type="text" id="code_read_box2" value="" /><br/>
    <input type="text" id="code_read_box3" value="" /><br/>
    <input type="text" id="code_read_box4" value="" /><br/>
    <input type="text" id="code_read_box5" value="" /><br/>
    <input type="text" id="code_read_box6" value="" /><br/>
    </form>
    
    </body>
    </html>

  2. #2
    have you ever tested any other office barcode tools to handle this question?

  3. #3
    Join Date
    Feb 2013
    Posts
    1
    I think you doubled your questions. But I recommend you google barcode generator add-in for Excel, then you can test whether those products are compatible with your request. If you want to program some codes yourself, I think you may post your question at http://www.excelforum.com. I once read some post which give free sample code for barcode reader or generator.

Similar Threads

  1. input data to the textbox after read the barcode using barcode scanner
    By newphpbees in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 19 Nov 2012, 02:25 AM
  2. Retrieving data from database and displaying in textbox when the button click
    By newphpbees in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 04 Jan 2011, 07:10 PM
  3. Display textbox value in a div
    By jaysnanavati in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 19 Jun 2009, 01:08 PM
  4. Text to disappear in input textbox
    By mikael eliasson in forum General Questions
    Replies: 0
    Last Post: 20 Nov 2007, 08:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •