Recommand · June 9, 2021 0

AutoTab Function with a input tag and a button

I already searched here and find some solutions with tab for the next input,I tryied to adapte this function to my code but unsuccessfully, just want to tab a input to a button when its catch up 6 lenght, then auto press enter, to send the data, onpage load, returns to the input and erase data, tryied this:

$("#PopID-Lido").keyup(function () {
        if (this.value.length == this.maxLength) {

I not try to auto press enter and pageload because I get stucked with this…

<div class="container-fluid">
    <div class="container-popid" for="PopID-Lido">POPID ATUAL <!--<span id="actPopid"> </span> -->

            <input type="text" id='PopID-Lido' class='PopID-atual PopID-Lido' maxlength="6">

    <div class="container-NextPopID" for='Next-PopID'>PRÓXIMO POPID 
         <output type="text" id="NextPopID" class='Next-PopID NextPopID'>  


<br><input type="button" id="senData" value="Send to PLC">