So I have created about 150 Testusers for Load Testing. I need to be able to delete those 150 user quickly. The current only way to Delete the users are one at a time.The way you delete a user is by click a Delete button that changes the value of a form and then submits it. Which then takes you to another page in which you are asked to confirm.
<a class="enable-delete-link" onclick="deleteUser(23367)">Delete</a>
function deleteUser(userID) {
$j('#deleteForm > input').val(userID);
$j('#deleteForm').submit();
}
<form action="user-delete.jsp" id="deleteForm" method="post">
<input type="hidden" name="user" value="" />
</form>
Is it possible to submit the form multiple time in multiple new window in which and can just go through and manually hit the confirm button.
I have tried
for(people = 23245; people < 23391; people++){
$j('#deleteForm > input').val(people);
$j('#deleteForm').attr('target', '_blank');
$j('#deleteForm').submit();
}
but it will only open a single page.
Thanks for you help!!
You don’t have to use the popup to make a form post, you can use an ajax post.
That being said it would be better to have a batch delete on the server, and you could submit a range of values to that action. Most browsers have limitations on concurrent ajax request that you would have to account for with this method.
You could also do something like this to make each subsequent request in turn: