SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: static page ajax style preloader
-
May 16, 2007, 12:00 #1
static page ajax style preloader
I have simple static page with many images and would like to make that fancy ajax style preloader - some gif with "loading...".
Just to have one transparent div and that image before all images and page would be 100% loaded.
Please help me.
-
May 16, 2007, 21:39 #2
- Join Date
- Oct 2006
- Location
- Kathmandu, Nepal
- Posts
- 4,013
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If i have understood, just have a div in a spcific location from the absolute top and left. And you can put one loading (i mean moving image) inside the div and make the div visibility false in default. And you have 4 different readyStates 1-4 in ajax, until the ajax readyState goes to 4, just make the loading div visible and make it again hidden whenever the readyState reaches 4.
Code:if(xmlHttp.readyState == 1){ divLoading.style.visibility = 'visible'; } if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete"){ divLoading.style.visibility = 'hidden'; divObj.innerHTML = xmlHttp.responseText }
Mistakes are proof that you are trying.....
------------------------------------------------------------------------
PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5
-
May 16, 2007, 23:22 #3
- Join Date
- Jan 2007
- Location
- Australia
- Posts
- 137
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
For the ajax preloader image gif, try out http://ajaxload.info/, you can create the web 2.0 style images
Check out my SitePoint articles and blog posts!
-
May 17, 2007, 01:34 #4
Bookmarks