1
I have a view
who carries a Datatable.Net, where I need to display a popup with the message "Aguarde...
".
Popup opens when the page is loaded, but how do I close it? The way I did, Popup doesn’t close, what’s wrong? Is there any other more efficient way to do this?
BS.: Then I will replicate this Popup to be used in other
View
's.
It follows the code below what I already have:
<style type="text/css">
.progresso {
display: none;
position: fixed;
top: 360px;
left: 50%;
margin-top: -50px;
margin-left: -100px;
vertical-align: middle;
text-align: center;
font-size: 16px;
font-weight: bold;
background-color: white;
border: 1px solid black;
height: 90px;
width: 120px;
}
</style>
.
//AQUI O HTML É CARREGADO
.
<div id="divCarregando" class="progresso">
<img src="~/Imagens/midi.gif" />
<br /> Carregando...
</div>
@section Scripts {
@Scripts.Render("~/Content/css")
@Scripts.Render("~/bundles/DataTables")
<script type="text/javascript">
$(document).ready(function () {
$('.dropdown-toggle').dropdown();
$("#divCarregando").show();
.
.
.
$("#divCarregando").show('hide');
});
</script>
perfect! thank you!
– hard123
Chun the way it is already meets my needs, but let’s say that the page load time can vary, in a certain period of day 1 second and another period 3 seconds, so how to work with this time variation ?
– hard123
You’re right @Adrianocordeiro, I didn’t think of that at the time. I have now edited my answer, now it is the right way, to disappear only when the page is fully loaded.
– Chun
Ball show! Funf perfectly. the/
– danilo