Jump to content

jepoy928

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by jepoy928

  1. The cursor is in focus within a textbox onLoad(). The QR code or barcode reader automatically pastes the employee number in the textbox. I want the javascript to redirect to another page with the value pasted in the textbox. If you have a better idea how it should be done, I will study it. Thanks so much.
  2. There are no error messages. It reads the QR code and barcode but it does not redirect. Should I use other EventListener?
  3. Good day to you guys. I'm working on an attendance system using a QR code / barcode scanner. Using onChage() functionI want to be redirected to a PHP file where it gets the employee number in the URL and validates the employee number and inserts to attendance table. What's wrong with my code? It does not redirect to my desired page. <html lang="en"> <head> <script> function ValidateEmployeeNumber(emp_num) { var emp_num = document.getElementById("emp_num").value; window.location.replace('validate_attendance.php?emp_num='+emp_num); } </script> </head> <body onload="document.AttendanceForm.ecode.focus();"> <form name="AttendanceForm" method="POST"> <h1>Attendance</h1> <div> <input type="text" id="emp_num" name="emp_num" onChange="ValidateEmployeeNumber(this.value)" class="form-control" placeholder="Employee Number"/> </div> </form> </body> </html> I hope you can guide me guys how to make this work. If you have different approach to the problem that works, I am more than willing to study your code. thanks very much
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.