|
Posted by SAM on March 25, 2008, 2:53 pm
Please log in for more thread options
Gnarlodious a écrit :
> Our computer user group website needs a system for uploading large
> files in the browser with some kind of progress indicator. Either a
> bar or numbers would be adequate. We just don't want uploaders to quit
> the upload because they think the browser crashed.
>
> Is there a free and open-source scripting package that will do this? I
> was thinking AJAX or Flash, but I'm in unfamiliar territory.
Tested locally Firefox:
<html>
<script type="text/javascript">
function throbber() {
document.getElementById('div_img').style.visibility='visible';
return true;
}
function nonThrbr() {
document.getElementById('div_img').style.visibility='';
}
</script>
<style type="text/css">
#div_img { position: fixed; top: 45%; left: 45%; visibility:hidden }
</style>
<form action="uploader.php" target="result"
onsubmit="return throbber()">
Upload your file : <input type=file name="filUpLoad">
<input type=submit>
</form>
<iframe name="result" onload="nonThrbr()" width=200 height=150></iframe>
<img id="div_img"
src="http://sandbox.sourcelabs.com/staticimages/pleasewait.gif"> </html>
<http://swik.net/Ajax/Ajax+Images>
<http://ajaxload.info/> <http://swik.net/Ajax/How+to+use+XMLHttpRequest>
<http://developer.mozilla.org/en/docs/AJAX>
<http://developer.mozilla.org/fr/docs/AJAX>
and google :-)
--
sm
|