Flash Content

I have a link which opens a modal window. The modal window is set up as an iframe. The uri that is loaded contains a flash element. I know that the flash element is being loaded, but it is not displaying. I am using FireFox 2.

Posted July 19th, 2007 at 7:10am by roman

UPDATE: I have just checked and it works in IE 7 but not firefox.

Posted July 19th, 2007 at 7:24am by roman

I have fixed it (well, it works for me in firefox anyway).

Here is my svn diff against the standard conrol.modal 2.2.0

Index: root/static/controlmodel.2.2.0.js

--- root/static/controlmodel.2.2.0.js (revision 212) +++ root/static/controlmodel.2.2.0.js (working copy) @@ -27,7 +27,7 @@ targetRegexp: /#(.+)$/, imgRegexp: /.(jpe?g|gif|png|tiff?)$/, overlayStyles: { - position: 'fixed', + position: 'absolute', top: 0, left: 0, width: '100%', @@ -74,6 +74,8 @@ return modalinstance; }, close: function(force){ + if(!Control.Modal.ie) /* Don't check this in IE because it causes an error and works fine without it */ + document.getElementsByTagName('body')[0].style.overflow = null; if(Control.Modal.current) Control.Modal.current.close(force); }, @@ -90,6 +92,8 @@ } var dimensions = element.getDimensions(); Position.prepare(); + if(!Control.Modal.ie) + document.getElementsByTagName('body')[0].style.overflow = 'hidden'; var offsetleft = (Position.deltaX + Math.floor((Control.Modal.getWindowWidth() - dimensions.width) / 2)); var offset_top = (Position.deltaY + Math.floor((Control.Modal.getWindowHeight() - dimensions.height) / 2)); element.setStyle({ @@ -458,4 +462,4 @@ }); if(typeof(Object.Event) != 'undefined') Object.Event.extend(Control.Modal); -Control.Modal.attachEvents(); \ No newline at end of file +Control.Modal.attachEvents();

Posted July 20th, 2007 at 9:12am by roman

Login or Register to Post