Question: I'm working with a web application that has a javascript front-end and Tomcat/java server. The front-end is simply a table where the user can modify the table and add more rows and fill out the form. I wrote some code so that the user can save the table. It sends the data in the form to the server through an http request, the server writes the data to an oracle database, everything works great.

As the table grows however, it is no longer feasible to send it all in one request. One suggestion was to split the rows up into different requests, but then if one request succeeds and another fails the oracle table will be incorrect.

What is the preferred method to send the server multiple chunks of data while the server does not begin to work on it until all the data has been received? I've seen plenty of SO questions about TCP connections regarding data chunking, but not really around http requests.

Thanks.

Answer: 
Thanks to @Waxi i have read through the other issue and I came up with this:

```
$(document).on("mousedown", ".use-ajax", function () {
    var modalClass = $(this).data('dialog-class');
    $(document).on('show.bs.modal','.modal', function () {
        $('.modal-dialog',this).addClass("modal-" + modalClass);
    })
});

```

Had to use `mousedown` event, coz `click` wouldn't work as it is blocked by something. 
Then it is getting content of `data-dialog-class` so it can be added to the `.modal-dialog` element after the modal actually loads, because its html is not present before that
use this for adding your custom class

data-dialog-options= '{"classes":{"ui-dialog":"your class name"}}'