Version 0.5
In version 0.5, the loading message is done through the use of callback functions
After printJavascript:
<script type="text/javascript"> xajax.callback.global.onRequest = function() {xajax.$('loading').style.display = 'block';} xajax.callback.global.beforeResponseProcessing = function() {xajax.$('loading').style.display='none';} </script>
|
In HTML somewhere
<div id="loading"><img src="images/loading.gif" alt="" /> Loading...</div>
|
in CSS somewhere
#loading { background: white; padding: 20px; border: 2px solid green; display: none; /* hidden */ position: absolute; left: 50%; margin-left: -100px; top: 25%; width: 200px; /*height: 100px;*/ /*margin-top: -50;*/ font-weight: bold; font-size: large; }
|
是不是太简单了?!
阅读(1171) | 评论(1) | 转发(0) |