Jump to content

Moritz

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hello, I got it working to some level: <script type="text/javascript"> function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) { sn1 = document.getElementById("InsertRecordSN1").value sn2 = document.getElementById("InsertRecordSN2").value if (!(sn1.length==10 && sn2.length==10 && sn1==sn2)){ return false; } } } function focussn2() { sn1 = document.getElementById("InsertRecordSN1").value if (sn1.length==10){ document.getElementById("InsertRecordSN2").focus(); } } document.getElementById("Submit").style.display = "none"; document.getElementById("InsertRecordSN1").focus(); document.onkeypress = stopRKey; document.getElementById("InsertRecordSN1").onkeyup = focussn2; </script> 1. Issue: document.getElementById("Submit").style.display = "none"; will break my code and it does not hide the Submit button 2. Issue I would like to have warning (maybe some text in red letters) inside the submission foam until my conditions are met. I know I can use the alert function but i dont want to use an pop up. Thank you very much for your help
  2. Hello, I need some help to automate my form. I use an Bar code scanner which puts an "enter" after the scanned code Both SN (serial numbers) must be the same My process should be the following; User: scan SN1 (bar code) + enter signal form bar code scanner System: verify the SN (should have 10 characters) If correct set focus to SN2 If not correct remove remove input from SN1 User: scan SN2 (bar code) + enter signal form bar code scanner System: verify the SN2 (should have 10 characters) If not correct remove remove input from SN1 Verify if SN1 and SN2 the same If not give user warning (remove the both SN1 and SN2 input) if yes enter foam I would appreciate any help how I can realize this. Thank you in advance
×
×
  • Create New...