Jump to content

Loading div


dreamwest

Recommended Posts

How can i have a div with an image inside that says "Loading...." until the image is actually loaded. Is this a body onload thing??

 

<div class=loading" align="center">Loading Image....<div>
<div class="image">
<img border="0" src="http://img.site.com/image.jpg" width="25" height="25">
</div>

Link to comment
https://forums.phpfreaks.com/topic/163292-loading-div/
Share on other sites

It's javascript, which you *could* use with body onload, but that's the old way of doing things.

 

Basically you just output that message while the page is loading, then replace/remove it with javascript when the page is done loading. Or else you can use javascript to load it in the first place, and remove it when the page is done loading (maybe a better option, in case your users don't have javascript enabled).

Link to comment
https://forums.phpfreaks.com/topic/163292-loading-div/#findComment-861750
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.