I'm stuck with a small issue, here I have more than 10 table rows, but my code is executing only once. Here is my code. Please help me on this

```
var rowlength = $("#totalLostProductGrid tbody tr ").length;

for(var i=1;i<=rowlength;i++){

    var startDateVal = $("#lpostartDate_"+i).val().split(/-|\s|:/);
    var endDateVal= $("#lpoendDate_"+i).val().split(/-|\s|:/);
    var lostProductValue = $("#lostProductionStartToEnd_"+i).val();
    var realEndDateVal = $("#eEndTime").val().split(/-|\s|:/);

    var FLNominalvalue = $("#idNominalPower").text();
    var idEstimatedLostProdVal = $("#idEstimatedLostProd").val();

    var durationTime = ((new Date(endDateVal[2],endDateVal[1],endDateVal[0],endDateVal[3],endDateVal[4],endDateVal[5])) -(new Date(startDateVal[2],startDateVal[1],startDateVal[0],startDateVal[3],startDateVal[4],startDateVal[5])) ) / 1000 / 60 / 60;

    var actualVal = durationTime * lostProductValue;

    alert(actualVal);

    if(actualVal  < FLNominalvalue){
        alert("success");
        return false;
    }else{
        alert("invalid case");
        return false;
        }

}

```