I am adding adding grid view data from text boxes and I restrict that user cann’t insert data above or less from that rate which are place in my label .label values come from the data base and change on every product means every product has its own price rate everything is ok now . I am adding condition on it
But problem is that these condition execute some time and sometime can’t execute following my code.
Function add()
{
var id = $("#Txtid").val();
var productquantity = $("#txtquantity").val();
var rate = $("#txtrate ").val();
var total = $("#txttotal ").val();
var highrate = $('#lbelhighrate ').html();
var lowrate = $('#lebellowrate').html();
I want user put the rate between or equal high rate and low rate .
Problem in my js that some product value are between high rate and low rate but it cann’t allow user to add the value into gridview it give message that value can’t between high rate and low rate. Some product value execute perfectly .please help me how I solve it
if (rate < highrate && rate > lowrate)
{
row = $("[id*=New_gridview] tr:last-child").clone(true);
$("td:nth-child(1)", row).html(id);
$("td:nth-child(2)", row).html(productquantity);
$("td:nth-child(3)", row).html(rate);
$("td:nth-child(4)", row).html(total);
$("[id*=New_gridview] tbody tr:first").after(row);
}
$("[id*= Txtid]").val('');
$("[id*= txtquantity]").val('');
$("[id*= txtrate]").val('');
$("[id*= txttotal]").val('');
}
Alert(“the Value insert are not between highrate and low rate”
}
Please help me how I solve that problem.