Hi monks,
I've been doing some work with CGI::AJAX, and I stumbled upon a tutorial about AJAX loading screens using the javascript code below:
<script type="text/javascript"> function init () { $('submit').onclick = function () { sendData(); } } function sendData () { var url = 'process.php'; var pars = Form.serialize('frm'); var myAjax = new Ajax.Request( url, {method: 'get', parameters: pa +rs, onLoading: showLoad, onComplete: showResponse} ); } function showLoad () { $('load').style.display = 'block'; } function showResponse (originalRequest) { var newData = originalRequest.responseText; $('load').style.display = 'none'; $('status').innerHTML = newData; } </script> </head> <body onload="init()"> <div id="load" style="display:none">loading...</div> <div id="status"></div>
Any thoughts?
In reply to CGI::AJAX loading screen? by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |