Check whether the Column has an Empty or White value

Asked

Viewed 118 times

0

Good morning. I’m trying to check if a Father-Son table column has gone blank. Can someone 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";
    }
});
  • Are you making a mistake? From what I’ve seen, your code is ok. Please explain the situation better.

  • if you have a minimal model of how this is the structure of your table, it helps more because I believe you are always looking at the same item

1 answer

0

How are you using the $.each to go through your input array, you need to check whether the current element is filled or not $(el).val() and do not use a new selector via id $("#tn_NEX").val().

Basically what you need is to change $("#tn_NEX").val() for $(el).val() and must achieve what you desire.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.