Skip to content Skip to sidebar Skip to footer

Get The Correct Number Of Objects When Sending A Form With JQuery

I am looking for a solution to my problem since last night without reaching either. This is an entirely created in JavaScript form that simulates a shopping cart. It must recover b

Solution 1:

Your Fiddle works fine, It looks like you assigned the click event handler more than once in your app.

To check if its so u can try replacing $('.valide').click(... with $('.valide').unbind().click(...

Like this :

$('.valide').unbind().click(function (e) {
  e.preventDefault();

  var columns = $('.trToCheck').map(function() {
    var $row = $(this);
    return {
        idenR: $row.data('id'),
        duree: $row.find($("select[name='chooseDuration']")).val()
    };
  }).get();
});

Post a Comment for "Get The Correct Number Of Objects When Sending A Form With JQuery"