0

I have an iFrame object that are defined like this:

<iframe src="iFrame SRC" frameborder="0" width="160" height="200" scrolling="no" longdesc="longdesc URL">
</iframe>

Now this frame took a long time to load, is it possible to make a loading text that simple says Loading frame..., and when the frame appears make the text go away? I tried putting the text right above the frame definition like this:

Loading...
<iframe ...>
</iframe>

It does stay on top of the frame but never goes away. How do you put a loading text for an iframe?

Tom Shen
  • 1,838
  • 3
  • 19
  • 40

2 Answers2

0

You can wrap the iFrame in a DIV with a class for loading a back ground image.

<div class="iframe-loading">
   <iframe src="iFrame SRC" frameborder="0" width="160" height="200"  scrolling="no" longdesc="longdesc URL">
   </iframe>
</div>


 .iframe-loading {
  background:url(../images/loading.gif);
 }
Massimiliano Peluso
  • 26,379
  • 6
  • 61
  • 70
0

A long time ago I used to do this:

<iframe src="iFrame" etc. ...>  
Loading frame...
</iframe>
E.C.Pabon
  • 265
  • 1
  • 9