function check()
{
var rowl=document.getElementsByClassName("tbody")[0].rows;
for(var r=0;r<rowl.length;r++)
{
ch=document.getElementsByClassName("tbody")[0].rows[r].cells[2].childNodes[0].value;
var tiderow=document.getElementsByClassName("tide")[r];//rows[0].cells[1].childNodes[0].value;
for(var t=0;t<tiderow.rows.length;t++)
{
var noo=tiderow.rows[t].cells[1].childNodes[0].value;
console.log(noo);
}
}
}
And I am checking each subtable value with the Main table cells2 value. If it is greater, then I am showing the error message.
But even though it is not greater it shows the error
function check()
{
var rowl=document.getElementsByClassName("tbody")[0].rows;
for(var r=0;r<rowl.length;r++)
{
ch=document.getElementsByClassName("tbody")[0].rows[r].cells[2].childNodes[0].value;
var tiderow=document.getElementsByClassName("tide")[r];//rows[0].cells[1].childNodes[0].value;
for(var t=0;t<tiderow.rows.length;t++)
{
var noo=tiderow.rows[t].cells[1].childNodes[0].value;
console.log(noo);
if(noo>ch)
{
console.log("Error occured");
}
}
}
}
