Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [javascript] auto submit upon full input of textbox


    i'm developing a "time attendance" system whereby a worker scans his ID card and the barcode reader would "enter" his ID into a text box, says 5 digits. i have an <input type=text maxlength=5>, is it possible to auto triggle something once the input reaches 5 digits?



  2. #2
    i found it, sorry for troubling

  3. #3

    I need it

    Kindly I need this exact script that you have discovered for the same reason Time Attendance

  4. $spacer_open
  5. #4
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    South- or "Mid-" Sweden
    maybe you could try using some onKeyDown, or onKeyPress and maybe use document.getElementById("id of text fiels").value.lenthof() to query the length.
    Regards Scienitca (registered user #335819 - )
    A master is nothing more than a student who knows something of which he can teach to other students.

  6. #5
    no problem

    i actually grabbed the code from usenet and did some modification (some of the original elements are still intact :P )

      <title>HOW TO&#58; Beep when text field full Using Javascript</title> 
      <meta name="author" content="Shannon Norrell"> 
      <script language="javascript"> 
        function DoCheckLength&#40;aTextBox&#41; &#123; 
          if &#40;aTextBox.maxLength - aTextBox.value.length==0&#41; &#123; 
      <FORM NAME="theForm" action=index.php> 
        <input type="text" maxlength="10" size="10" 
    onkeyup="DoCheckLength&#40;this&#41;;" ID="firstTextBox" name="firstTextBox"> 
        <input type="text" maxlength="5" size="5" 
    onkeyup="DoCheckLength&#40;this&#41;;" ID="secondTextBox" NAME="secondTextBox"> 
      <EMBED id="beep" SRC="beep.wav" NAME="beep" AUTOSTART="FALSE" 
    good luck

Posting Permissions

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