jquery to fetch the contents from a selected row in php -
here source code , not able fetch selected content when check checbox rather taking contents table ... can spot mistake in code... ur time
for(k=0;k<=9000;k++) { //each change $("#status"+k).click(function() { for(j=0;j<=numoflimit;j++) { var product_name = encodeuricomponent($('#product_name'+j).val()); alert(product_name); var barcode = encodeuricomponent($('#barcode'+j).val()); var quantity = encodeuricomponent($('#quantity'+j).val()); var cart=product_name + barcode + quantity; alert(cart); $('#cart1').val(cart); } }); });
you have 2 loops here. outer 1 seems attach click handler rows (or checkboxes of each row). inner 1 makes no sense. it's result no matter checkbox click, iterate on rows , collect values.
Comments
Post a Comment