Welcome Guest, Not a member yet? Register   Sign In
checkbox based input item
#10

Give the inputs for the number of sets a name also: name="sets[]".
Remove the onChange part that you already have.

Then, in the jQuery part that starts with $(document).ready .. insert this:
Code:
    $("input[name='sets[]']").change(function(){
        row = $(this).parents('tr');
        n = $(this).val();
        f = row.find("input[name='india[]']").val();
        total = n * f;
        alert(total);
    });

Now, if you change any of the inputs with the name "sets[]", it will trigger a calculation.
Reply


Messages In This Thread
checkbox based input item - by kvanaraj - 08-20-2018, 11:35 PM
RE: checkbox based input item - by Pertti - 08-21-2018, 12:28 AM
RE: checkbox based input item - by kvanaraj - 08-21-2018, 01:40 AM
RE: checkbox based input item - by Pertti - 08-21-2018, 02:02 AM
RE: checkbox based input item - by kvanaraj - 08-21-2018, 02:34 AM
RE: checkbox based input item - by kvanaraj - 08-24-2018, 12:54 AM
RE: checkbox based input item - by InsiteFX - 08-24-2018, 03:13 AM
RE: checkbox based input item - by Wouter60 - 08-24-2018, 07:41 AM
RE: checkbox based input item - by kvanaraj - 08-24-2018, 11:00 PM
RE: checkbox based input item - by Wouter60 - 08-25-2018, 12:18 AM
RE: checkbox based input item - by kvanaraj - 08-25-2018, 12:44 AM
RE: checkbox based input item - by Wouter60 - 08-25-2018, 02:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB