Forum Moderators: open

Message Too Old, No Replies

loading hourglass for an iframe?

can I display something else while the iframe is loading?

         

httpwebwitch

7:04 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is an interesting question/challenge a colleague posed to me.

He has an iframe, into which other sites/pages are being loaded. He would like the ability to show a "loading..." graphic, animating away until the iframe has completed loading.

My first thought is, he makes a "loading" div that sits snugly atop the iframe, obscuring it with a custom animation. Then some iframe.onLoad() event makes the div invisible.

Anyone ever done this? tried it? succeeded? I don't want to spend the hours experimenting with this if someone else has already done it and can lend me some spare wisdom.

ryanc

4:17 pm on Jan 24, 2006 (gmt 0)

10+ Year Member



Yep, I've done that. What your saying is on the right track. I did it by using CSS & javascript. I had the loading image positioned absolute on top of everything else then dynamically changed the z-index and set the style to hidden