I have a text input, which has three dynamically-generated characters On when page-load; what I want is that when a user enters data in that fieLd the user should be unable to remove that first three characters from the input.
The text input can contain 10 characters in total, three which we generate and 7 entered by the user.
Currently if the user presses backspace he can delete all characters, but I don't want to allow them to delete the first three characters.
On page-load the script sets three characters in the Lab text input:
<input id="Lab" maxlength="10" name="LabWareId" type="text" value="" class="valid">
$('#Lab').keyup(function () {
if ($(this).val().length == $(this).attr('maxlength'))
$('#DateReceived').focus();
});