0

I am working on a piece of code that is to be used on a tablet as a web app. There is a section where the user can new drugs to a patient history and I have a form where they can fill out different details. When I test it on my laptop the alert works find, but on the tablet it does not seem to function, it allows the user to proceed through the form without any alerts. Any ideas?

Here is a part of the form

  <div class="form-group">
                  <label class="control-label col-sm-2">Dose:</label>
                  <div class="col-xs-3">
                  <input type="text" name="dose" id="dose" title='Enter a valid dosage such as milligram/mg'
 path="receiverLastName" onkeyup="valid(this)" onblur="valid(this)"required>
                  </div>
             </div>

This is the only function I have, is there another function I should use?

<script>
    $(function() {
        $("#dose").tooltip();
    });
    </script>
Barry McDaid1982
  • 157
  • 1
  • 2
  • 14

1 Answers1

1

keystroke events vary a lot on different devices. This answer details some good information that might help you overcome limitations. Or this if you feel like pushing the boat out.

It would be better to revise your method of validation towards HTML5 functionality. This would let the browser take the strain.

Dont forget that if the data is going to a database, you also need to validate server side as well to allow for either out of date browsers, javascript being inactive or just plain attacks.

Community
  • 1
  • 1
DevDonkey
  • 4,835
  • 2
  • 27
  • 41