$.ajax() problem
$.ajax() problem
Hi All, I have problem with $.ajax() not sending data correctly or possibly an ajax race problem.
I have a form that allows a user to perform a group edit action (a user can select more than 1 record to edit), the problem is that only one record gets updated when a group edit is performed, but if the user selects 1 record the editing works fine.
I googled and found the Ajax Queue Plugin, but when I add the option "mode: 'queue'", then the $.ajax() does not send the data to the server at all and there is no error in FireBug, I am confused, I am using jQuery 1.4.2
sample code, my original code that works when 1 record is selected, did not have the: mode: "queue",
- $.each($("#qualification_edit tbody tr") , function(i, tr){
var qualification_id = $(tr).attr("id");
var qualification_name = $(tr).children().children("#qualification_name").val();
var year_obtained = $(tr).children().children("#year_obtained").val();
var institution_name = $(tr).children().children("#institution_name").val();
- $.ajax({
- type: "POST",
- url: "ajax_server.php?act=YnjNkblahblahblah",
- data: "qualification_name=" + encodeURIComponent(qualification_name) + blah blah,
- dataType: "html",
- cache: false,
- mode: "queue", // new addition ??? confused!
- success: function(ajax_respose){
- show_qualifications();
- }
- });
- });
any ideas, please....