jquery - xmlhttp.send() within .each() sends only the last record -
I'm trying to teach myself some php and Ajax for a pet startup project - $$$ $ someone Real technical man :-) Anyway, this is the background. I have selected a data in the HTML table, when an submitted function is called in the update. To select the selected record (radio button) I loop through the table and call them the update line file, assign a row and loop through each line and send the record to add to the database when I have If there is a JavaScript alert statement then all records are added to the database. But if I comment the warning then only the final record is added. I have tried to add 3 seconds, 5 seconds delay in the loop.
Here is the code snippet - some variables are set out of this loop and there is no problem with the values. I think connecting one at a time would be expensive on DB's performance. I should change that argument anyway but in the interim it would be nice to know what is happening here. N You are sending HTTP request server asynchronous ('true' second parameter xmlhttp.open). This means that the next item in the row overrides the previous one. You can try: Can not use every 'iterator. More info:
Comments
Post a Comment