Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
Thread: Loading indicator question
02-12-2013, 10:05 PM #1
Loading indicator question
I am doing a loader indicator (image with some text next to it) while the page loads.
But im not having so much success with it.
right after the body tag i have this
<div id="loading-mask"></div> <div id="loading"> <div class="loading-indicator"></div> </div>
Then right after that i have the js
Not sure what i am mssing here or maybe i dont have this in the right place in the file. Should it go on the very bottom of the file?
Last edited by durangod; 02-12-2013 at 10:48 PM.
02-12-2013, 10:21 PM #2
- Join Date
- Jan 2011
- Thanked 667 Times in 666 Posts
loading-indicator is not an ID it's a class.Code:document.getElementById('loading-indicator').innerHTML = 'Loading file...';
And don't see where your loading anything. Is that somewhere else?
Users who have thanked sunfighter for this post:
02-12-2013, 10:29 PM #3
good eye i was cleaning it up and i removed the span because i had my own message and i honestly did not realize it was the id it should look like this
same js as above but this is dif
Code:<div id="loading-mask"></div> <div id="loading"> <div class="loading-indicator"> <span id="loading-indicator">Loading. Please wait...</span> </div> </div>
see any issues here ?
02-12-2013, 10:44 PM #4
- Join Date
- Jun 2002
- London, England
- Thanked 2,573 Times in 2,551 Posts
This may be useful:-
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Users who have thanked Philip M for this post:
02-12-2013, 10:47 PM #5