function Delete(chk)
{
for (i = 0; i < chk.length; i++)
{
if( chk.checked )
{
$.post( 'delete_message.php', { message: ID_Array } );
}
}
window.location.reload()
}
[web] $.post does not work in a loop?
I have to execute a php script on my server to tag a message as deleted but when I do more then one or two at a time it skips them.
Here is an example:
Is there anyway to make the server process every request without skipping any?
You'll need to do only one post() function in the loop, passing a callback function which then does the next post() and passes a callback, etc.
What would be much cleaner and faster and easier, though, would just be to have delete_message.php support deleting multiple IDs at a go.
What would be much cleaner and faster and easier, though, would just be to have delete_message.php support deleting multiple IDs at a go.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement