Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  2. <script src="JS/jquery-1.10.2.js" type="text/javascript"></script>
  3. <style type="text/css">
  4. .modal
  5. {
  6. position: fixed;
  7. top: 0;
  8. left: 0;
  9. background-color: black;
  10. z-index: 99;
  11. opacity: 0.8;
  12. filter: alpha(opacity=80);
  13. -moz-opacity: 0.8;
  14. min-height: 100%;
  15. width: 100%;
  16. }
  17. .loading
  18. {
  19. font-family: Arial;
  20. font-size: 10pt;
  21.  
  22. width: 200px;
  23. height: 100px;
  24. display: none;
  25. position: fixed;
  26.  
  27. z-index: 999;
  28. }
  29. </style>
  30. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  31. <script type="text/javascript">
  32. function ShowProgress() {
  33. setTimeout(function () {
  34. var modal = $('<div />');
  35. modal.addClass("modal");
  36. $('ContentPlaceHolder1').append(modal);
  37. var loading = $(".loading");
  38. loading.show();
  39. var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
  40. var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
  41. loading.css({ top: top, left: left });
  42. }, 200);
  43. }
  44. $('form').live("submit", function () {
  45. ShowProgress();
  46. });
  47. </script>
  48. </asp:Content>
  49. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  50. <asp:Button ID="btnSubmit" runat="server" Text="Button" OnClick="btnSubmit_Click"/>
  51. <div class="loading" align="center">
  52. Loading. Please wait.<br />
  53. <br />
  54. <img src="IMAGES/loader231.gif" alt="" />
  55.  
  56. </div>
  57. </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement