the page is loading, can someone give me the code to do this?
I need a loading bar that appears while (read inside)
| venc wrote: |
| the page is loading, can someone give me the code to do this? |
Not sure this is what you want:
| Code: |
| <html>
<head> <title>test</title> </head> <body onload="document.getElementById('content').setAttribute('style', 'display:block');document.getElementById('loading').setAttribute('style', 'display:none');"> <div id="loading">the page is loading</div> <div id="content" style="display:none"> <img src="http://nosheep.net/wp-content/upload/random_kittens.jpg" width="200px" height="200px"> </div> </body> </html> |
WARNING: The image used above (found with a Google search) is 2576 x 1932 pixels - 1425k!
ok, thanks man!
uh, yeah, didnt work, 'cause it always shows the text "page is loading" and not just when its loading
It works in Fire Fox, it doesn't work in Opera, it never shows the "the page is loading". It doesn't work in crapE it only, shows "the page is loading"
ok...dont see how that helps...but thanks.
| The Conspirator wrote: |
| It works in Fire Fox, it doesn't work in Opera, it never shows the "the page is loading". It doesn't work in crapE it only, shows "the page is loading" |
1. I use Firefox
2. I don't know JavaScript
| venc wrote: |
| uh, yeah, didnt work, 'cause it always shows the text "page is loading" and not just when its loading |
| Code: |
| <html>
<html> <head> <title>test</title> </head> <body onload="document.getElementById('content').style.display='block';document.getElementById('loading').style.display='none';"> <noscript> Your browser ether dose not support java script or java scripts has been disabled. Pleas update your browser or tern on java script support. </noscript> <div id="loading">the page is loading</div> <div id="content" style="display:none"> <img src="http://nosheep.net/wp-content/upload/random_kittens.jpg" width="200px" height="200px"> </div> </body> </html> |
This works in all 3.
Unfortunately you can not make it work if hey do not have java script support or have terned it off. But thats what <noscript> is for.
| The Conspirator wrote: |
| This works in all 3.
Unfortunately you can not make it work if hey do not have java script support or have terned it off. But thats what <noscript> is for. |
Thank you very much for another trick I can put in my bag of tricks.
thanks man, I will go see if it works!
works perfect for me...
