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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -