Html Js page loader

jafbox

New Member
Messages
12
Reaction score
0
Points
0
were can i learn ajax in canada nb i need an actual person to teach me
 

farscapeone

Community Advocate
Community Support
Messages
1,165
Reaction score
27
Points
48
Try using jQuery.

You can find sample cone here. Just scroll down to "Launching Code on Document Ready" paragraph.


  1. Add a new div wrapper around your content and set the display:none style as default.
  2. Add preloading image into another div with display:block style.
  3. Use the jQuery to detect when page is loaded.
  4. When page is loaded set your wrapper div to display:block and preloading image div to display:none.

Note that there's no way you can display percents loaded.
 
Last edited:

quantum1

New Member
Messages
68
Reaction score
0
Points
0
I am pretty sure that gmail uses js and ajax, but they are still most likely showing you the progress they are making when loading your data (gmail info), not the progress of the page itself. Plus, even if you get all the information from the server there is still the rendering time, which could be significant depending on the size/crudeness of the web page being rendered. As mentioned above, your browser is the only one that can provide an accurate progress bar, which it does based on (I believe) percentage of resources acquired from the server. I am pretty sure that even your browser progress bar will show completed when sometimes the page has not yet rendered.
In short, I believe what you are trying to do is valid from an understanding/coding point of view, but not achievable from a percentage progress bar point of view because at the very end it could still take significant time to render the page even after all resources have been acquired.
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
So no real hope, i understand?
Edit:
what abt using flash?
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
were can i learn ajax in canada nb i need an actual person to teach me
use w3schools, I'm canadian also, and it did not stop me.

In short, I believe what you are trying to do is valid from an understanding/coding point of view, but not achievable from a percentage progress bar point of view because at the very end it could still take significant time to render the page even after all resources have been acquired.
Unless you do the whole site in flash, which is not good for SEO and assistive technologies.
 
Last edited:
Top