How to get prefix id values and check i.e. id defined or not, and how to store a value in variable.
calculate_grand_total();
}
function calculate_grand_total() {
var rowcount = $("#hidden_rowcount").val();
var grand_total = parseFloat(0);
for (i = 0; i < rowcount; i++) {
grand_total += parseFloat($("#gtl_" + i).val());
}
$("#totalamt").html(grand_total);
}
If one of the id is missing that time it should not printing