I am facing issues while loading html data into the DOM. While the data is loading, it blocks the browser completely and the user needs to keep waiting till the entire data is loaded on the DOM and then the browser will display the data.
I am looking for a simultaneous loading and display of data instead of the long wait time to display the data. My code looks like below...
<div class="row">
<div class="col s12" id="tabdata">
</div>
</div>
<script>
$.ajax({
type: $('#testform').attr('method'),
url: $('#testform').attr('action'),
data: $('#testform').serialize(),
success: function (response) {
$('#tabdata').html(response)
</script>
The HTML response returned according to the above code is a table markup which will look like as below...
<table id="table_id" class="striped hoverable responsive-table centered">
<thead><tr><th>Cluster</th><th>vserver</th><th>policyname</th><th>ruleindex</th><th>protocol</th><th>clientmatch</th><th>rorule</th><th>rwrule</th><th>anon</th><th>superuser</th><th>allow-suid</th><th>allow-dev</th></tr></thead>
<tr><td>pl-cis-claa-p01</td><td>colooracle-p0043</td><td>AI205256_fnr_lab644d_7_n01oraarch1_nosnap</td><td>1</td><td>nfs3</td><td>c22rphcorl.int.refinitiv.com</td><td>sys</td><td>sys</td><td>65534</td><td>sys</td><td>true</td><td>true</td></tr>
<tr><td>pl-cis-claa-p01</td><td>colooracle-p0043</td><td>AI205256_fnr_lab644d_7_n01oraarch1_nosnap</td><td>2</td><td>nfs3</td><td>c306nfn.int.thomsonreuters.com</td><td>sys</td><td>sys</td><td>65534</td><td>sys</td><td>true</td><td>true</td></tr>
<tr><td>pl-cis-claa-p01</td><td>colooracle-p0043</td><td>AI205256_fnr_lab644d_7_n01oraarch1_nosnap</td><td>3</td><td>nfs3</td><td>c306nfn.int.thomsonreuters.com</td><td>sys</td><td>sys</td><td>65534</td><td>sys</td><td>true</td><td>true</td></tr>
<tr><td>pl-cis-claa-p01</td><td>colooracle-p0043</td><td>AI205256_fnr_lab644d_7_n01oraarch1_nosnap</td><td>4</td><td>nfs3</td><td>c306nfn.int.thomsonreuters.com</td><td>sys</td><td>sys</td><td>65534</td><td>sys</td><td>true</td><td>true</td></tr>
<tr><td>pl-cis-claa-p01</td><td>colooracle-p0043</td><td>AI205256_fnr_lab644d_7_n01oraarch1_nosnap</td><td>5</td><td>nfs3</td><td>c306nfn.int.thomsonreuters.com</td><td>sys</td><td>sys</td><td>65534</td><td>sys</td><td>true</td><td>true</td></tr>
..............
..............
......... (Around 20k rows)
</table>
This table markup can have around 20K rows... I have just mentioned a sample for the sake of simplicity..
It would be great if someone could suggest a way to display this data simultaneously while it is being loaded into DOM
Thanks in advance!!