demonlord 0 Report post Posted January 14, 2008 hello, I'm looking for a preloader script for my site. like it will display an loading image while the site is loading and the once the page has loaded the image will disapear. i tryed searching for one on google but i could not find one, i think i searched for the worng thing. if some one knows how to make one or where i can find one that would be great.Thanks Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted January 14, 2008 Use CSS only to display then Pre-loading image like on this link http://forums.xisto.com/no_longer_exists/ Share this post Link to post Share on other sites
demonlord 0 Report post Posted January 14, 2008 not excatly what i was looking for. i was hoping for something like browserUpdate.html has once you login in. where it shows there logo and a loading bar, and then it disaperas. Share this post Link to post Share on other sites
moodsey211 0 Report post Posted July 10, 2008 not excatly what i was looking for. i was hoping for something like browserUpdate.html has once you login in. where it shows there logo and a loading bar, and then it disaperas.they're using flash to do it. i don't think it is possible with only javascripts. Share this post Link to post Share on other sites
Rigaudon 0 Report post Posted April 6, 2010 Hi,I believe this is what you're looking for:http://www.ajaxload.info/Custom AJAX loading images.Simply put, have an HTML element that you can address with the DOM easily, such as: <div id="myDiv"></div> In this div or span or whatever element you've named it, put the image in assuming you've already uploaded it of course.<div id="myDiv"><img src="ajax-loader.gif" /></div> Or wherever your loader image is located.To make it disappear when the page has loaded is simple enough.Write some AJAX and have the responseText fill in the innerHTML of the selected element. xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4){ document.getElementById('myDiv').innerHTML=xmlhttp.responseText; } }; xmlhttp.open("GET",url,true); xmlhttp.send(null); }</script> linenums:0'><script type="text/javascript">function GetXmlHttpObject(){ if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject){// code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null;}function ajaxFunction(){ var xmlhttp=GetXmlHttpObject(); if (xmlhttp==null){ alert ("Browser does not support HTTP Request"); return; } var url="url.php"; document.getElementById('myDiv').innerHTML="Loading... <img src='images/ajax-loader2.gif'>"; //You don't need to do this if you've already put in the image. xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4){ document.getElementById('myDiv').innerHTML=xmlhttp.responseText; } }; xmlhttp.open("GET",url,true); xmlhttp.send(null); }</script>Plain and simple. Share this post Link to post Share on other sites