Currently facing a strange issue or maybe it's just me missing something obvious. I've searched for the error but couldn't find the right solution.
I am attempting to execute some Javascript code when the key "/" is pressed in a text box.
Below is the provided code snippet:
function ClockIn(){
var kb_press = event.keyCode;
if(kb_press == 47)
{
alert("you are clocking in");
if(document.ClockIn.status.value === "IN"){
alert("You Cant Clock in while you are already Clocked in\n Please try again!")
document.ClockIn.tx_Barcode.value, document.ClockIn.status.value, document.ClockIn.name.value = "";
}
}
}
<form method="POST" name="ClockIn">
<lable>Type your BarCode <input type="text" name="tx_Barcode" id="tx_Barcode" class="tx_Barcode" onkeypress="ClockIn()" ></lable><br>
<lable>What is your Name? <input type="text" name="name"></lable><br>
<lable>Your current Status <input type="text" name="status"></lable><br>
</form>
The problem encountered: "ClockIn is not a function"