0
Via Javascript or Jquery, I need to check if there is a negative balance. If you have a negative balance, then: var SALDO_DISPONIVEL = 0 other than: var SALDO_DISPONIVEL = 1
The following is the source html:
<html>
<head>
<title>Histórico das Aprovações</title>
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
<style type='text/css'>
table {
table-layout: fixed;
border-collapse: collapse;
}
th {
border: 1px solid #000;
font-family: Verdana, Arial, sans-serif;
font-size: 0.8em;
background-color: #009fef;
padding: 0px 5px 0px 5px;
}
td {
border: 1px solid #000;
font-family: Verdana, Arial, sans-serif;
font-size: 0.8em;
padding: 0px 5px 0px 5px;
}
.centro {
text-align: center;
}
.cinzaClaro {
background-color: #CACACA;
}
.cinzaEscuro {
background-color: #EBEBEB;
}
</style>
</head>
<body style='text-align: center; margin-left: 0px; margin-top: 3px;'>
<table>
<thead>
<tr>
<th style='width: 100px;'>Material</th>
<th style='width: 100px;'>Verba Total</th>
<th style='width: 100px;'>Saldo Disponível</th>
</tr>
</thead>
<tbody>
<tr class='cinzaEscuro'>
<td class='centro'>210</td>
<td class='centro'>76.045,00</td>
<td id='saldo' class='centro'>45.555,00</td>
</tr>
<tr class='cinzaClaro'>
<td class='centro'>211</td>
<td class='centro'>100,00</td>
<td id='saldo' class='centro'>80,00</td>
</tr>
</tbody>
</table>
</body>
</html>
How do you know what is the negative giving value? did not fail to say what is the account !
– novic
In other words, if you have any <td id='balance'> that is negative the SALDO_DISPONIVEL variable must be 0. In this example of HTML there is no negative balance, then the SALDO_DISPONIVEL variable must be 1
– Y. Menon