Log in

View Full Version : Close frame with Embed Video



wide
03-17-2006, 12:31 AM
Who can help me with the next problem?

I have an Iframe with an embeded Windowsmedia video. When the video is at the end, the Iframe must automatic close and return to the mainpage.

Is there a script for it or can write someone a script that close a frame when the WM video stopped?

Many thanks for the help!

wide

jscheuer1
03-18-2006, 05:05 AM
I keep seeing this post and hoping someone who knows the answer will respond but, perhaps you already know part of it. I know how to get rid of an iframe. What I am not real clear on is how to know when the video is over. Is there some variable that can be tested for to find out if the video is over? Or is there one that will let us know when it is finished buffering and has started playing? If either, we can work off of that. When we know the video is over we can do a:


document.getElementById('iframeId').style.display='none'

or a:


document.getElementById('iframeId').style.visibility='hidden'

Depending upon if you want the page to collapse into the space the iframe occupied (first method) or simply want the iframe to disappear (second method).