|
There is a problem with multiple loading of Overlib in internet explorer. Joomla uses Overlib for several components, so it's good to be aware of this nasty problem.
How can this happen, you ask. Here's how: let's say you write a module using overlib. to be sure you added a mosCommonHTML::loadOverlib();
Ok. that's the first one. Then let's assume you have a component that does this too. Now you see how you can get two calls. Firefox - of course - does not care .. but the evil twin Internet explorer does display the infamous yellow error flag and overlib never shows So, now how to avoid it: if (!function_exists('myLoadOverlib')) { function myLoadOverlib () { global $mosConfig_live_site; $r = ""; $txt .= '<script language="javascript"> '."\n"; $txt .= " if ( !document.getElementById('overDiv') ) { \n"; $r .= " document.writeln('<div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:10000;\"></div>');\n"; $r .= " document.writeln('<script language=\"Javascript\" xsrc=\"$mosConfig_live_site/includes/js/overlib_mini.js\"></script>'); \n"; $r .= " } \n"; $r .= "</script> \n"; return $r; } } Then instead of mosCommonHTML::loadOverlib(); write echo myLoadOverlib (); That should solve it
|