We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

celoria on 01/15/08


Tagged

ajax loading


Versions (?)


Who likes this?

5 people have marked this snippet as a favorite

jonhenshaw
skywalker
Netzach
stoker
DFCNT


Preloading div


Published in: CSS 


CSS and Javascript to show a message "Loading" when click on "save form button"

  1. <style>
  2. #loading {
  3. position:absolute;
  4. width:500px;
  5. height:50px;
  6. top:50%;
  7. left:50%;
  8. margin: -25px -150px;
  9. background-color:#FFFFFF;
  10. border:1px solid #CCCCCC;
  11. text-align:center;
  12. padding:20px;
  13. }
  14. </style>
  15. <div id="loading" style="display:none">
  16. <img src="image/ajax.gif" /> Loading...
  17. </div>
  18. <a href="#" onclick="document.getElementById('loading').style.display='';">test</a>

Report this snippet 

You need to login to post a comment.