Verify that the Column has a Blank or Empty value

0

Good morning. I'm trying to verify that the column of a Parent-Child table has gone blank. Can anyone help me?

// VERIFICA SE ALGUM COLUNA FICOU EM BRANCO
var elVlr = $('#itensInventario tbody > tr > td input.linhaItemInventario');
$.each(elVlr, function(i, el) {
    if ($("#tb_NEX").val() == null || $("#tb_NEX").val() == "") {
    Status = "erro";
    }
});
    
asked by anonymous 01.03.2017 / 15:22

1 answer

0

Since you are using $.each to traverse your array of inputs, you need to check whether the current element is filled or not $(el).val() and not use a new selector with $("#tn_NEX").val() .

Basically what you need is to change $("#tn_NEX").val() to $(el).val() and should achieve what you want.

    
01.03.2017 / 17:01