html - Loading image sometimes doesn't appear -
in system have php file process transaction , submit form via post. , times takes 10 seconds. put loading gif (less 100k size) on that, showed while user waits complete. problem transactions completed fast image has no time appears. , when gif not load shows image space broked link, looks error.
html:
<div class="content_animated"> <img src="../images/ra_loading.gif" alt="aguarde..processando seu pagamento..." title="aguarde..processando seu pagamento..." /> </div> css:
.content_animated{ position:absolute; width:436px; height:38px; top:50%; left:50%; margin-left:-218px; margin-top:-16px; } is possible force load or set delay give time gif load? i'm newbie in programming, please me on it?
you can see way have preloaded image javascript
<html> <head> <script language = "javascript"> function preloader() { loadingimage = new image(); loadingimage.src = "../images/ra_loading.gif"; } </script> </head> <body onload="javascript:preloader()"> <!--call javascript preload image--> <img src="../images/ra_loading.gif" alt="aguarde..processando seu pagamento..." title="aguarde..processando seu pagamento..." /> </body> </html>
Comments
Post a Comment