-
flash video still playing in hidden <div>
Hello all,
im using this script to toggle the display of a flash video in a div:
Code:
function toggleLayer( whichLayer )
{
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;
// if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
//elem.innerHTML=''; //close toggle
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block'; // open toggle
}
and:
Code:
<a href="javascript:toggleLayer('null');" onclick="javascript:toggleLayer('video-sample');"><span>View Video</span></a>
to fire it off. all works, the problem I'm having is in IE7, the video continues playing in the background even after the div is hidden, but this doesnt happen in FF3, it works just fine.
After doing some research, I'm at a loss if anyone has any suggestions or can point me to a tutorial that might help with this problem in IE, much appreciated.
Thanks for looking.
T
-
still looking for a solution if anyone can help, starting to pull my hair out
T
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|