Hi
I have dynamically created a series of lines that are completed and then the data is sent to a database.You can see the image below:
[IMG][/IMG]
Each row (with gray color) has a series of select and input elements that someone must fill.Now..
I have the following jquery script to fetch the data from each row and post them into database via php.
The script is this:
Code:
$('#sendFlights').on('click',function (){
                   var instr,student,katigoria,askisi,callsign,duration,ade,logos,date;
                   date=$('#flightDate').val();
                             $('.rowData').each(function (){                                  
                                   var a=$(this);                                  
                                   
                                     instr=a["0"].children["0"].children["0"].children[1].value;
                                     student=a["0"].children[1].children["0"].children[1].value;
                                     katigoria=a["0"].children[2].children["0"].children[1].value;
                                     askisi=a["0"].children[3].children["0"].children[1].value;
                                     callsign=a["0"].children[4].children["0"].children[1].value;
                                     duration=a["0"].children[5].children["0"].children[1].value;
                                     ade=a["0"].children[6].children["0"].checked;
                                     logos=a["0"].children[7].children["0"].children[1].value;
                                     if(ade===true && duration===""){
									 duration="0.0";
									 }
                                     if(instr!='' && student!='' && katigoria!='' && askisi!='' && callsign!='' && duration!='' && date!='' ){  
                                     $.post( "../functionsPhp/formsPhp.php", { ekptis: instr, student: student,katigoria: katigoria, askisi: askisi, callsighn: callsign, duration: duration, ade: ade, logos: logos,date: date })
                                          .done(function( data ) {
                                              console.log('Success');
                                     });
                                     }else{
                                     alert('Σφάλμα Καταχώρησης στην '+a["0"].dataset.number+'η γραμμή.');                                     
                                     return false;
                                     }
                                   
                                   
                               });
             });
The problem I'm facing is that the code only sends the first 6 entries and not the rest if they are over 6 when I use pc with a 4GB Ram and a dual core processor.If this script is running at ie AMD A8 6600k with 8 gb Ram the script sends all the rows into database.I haven't errors in my console when the script is executing. What is going wrong?
Thanks a lot.
PS
I have thought to create first a JSON object for all data and then pass these to $.post but I want this solution as a last choice.