Comments/embedded items
|
Comments (the mouse over comment preview on the right) will drop behind embedded items (eg. youtube clips).
|
|
Suggested fix: script to ensure the following parameter is in the <embed /> tag...
wmode="transparent" This and a z-index on the div (that hovers over) will mean it will appear in front of it! I've come across this problem before! :) |
|
El Cap, have you any ideas or recipes for injecting this param with javascript? I think ideally it would be great to do something like this on the entire page where it finds all <embed> tags and inserts a <param name="wmode" value="transparent"> in each of them.
|
|
Try this...
<script language="Javascript" type="text/javascript"> document.observe("dom:loaded", function() { $$('embed').each(function(s) { var embed_param = document.createElement('param'); embed_param.setAttribute('name', 'wmode'); embed_param.setAttribute('value', 'transparent'); s.appendChild(embed_param); }); }); </script> There may be a slightly more efficient way to do it... It's been a while since I've used prototype.js. I could do it much more eloquently in mootools ;) |
|
Excellent, will give it a shot..
|
|
Hmm negative.
The param is inserted correctly, but apparently the object cannot be altered dynamically. It has to be set when the page renders. http://www.csschat.com/showthread.php?t=8510 |
|
Ahhh, yeah... that makes sense. I guess it'd have to be done server side
|
|
Does it use PHP? I would use a script to first strip out any existing wmode's to prevent duplicates with a preg_replace and then use preg_replace again to insert into all embed tags on the page.
Regex to remove existing ones would be: "/wmode="(.*?)"/i" replace with "" Then you could search for <embed and replace with <embed wmode="transparent" |
|
A little bit has changed since this this thread started.
We now construct our own embed codes when certain URLs are posted. (right now, only YouTube) Doing it this way, allows us to force a wmode="transparent" in there -- which seems to be working so far. |
If you were logged in, the place to post a response would be here.




