Page 1 of 2
[SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Mon 28. Jan 2008, 23:41
by Jensensen
Hi folks,
today my friends an me were wondering about a strange error:
There are two CPs on the page: image <div> with Lightbox switched on and FLV player.
All browser on linux, win or mac display the page with no problem.
But sometimes, e.g. after --> reload or when you go back to this page IE7 acts really strange.
It loads the page but stops abrupt and shows an error window:
ERROR: "Page can not be loaded"!!! [YOU STILL CAN SEE PAGE BEHIND] And then the screen switches immediately to a blank page!!!
When I disable one CP, either image <div> or FLV player, the page loads well.
Seems to be an interaction conflict of swfobject.js, mootools.js and slimbox.js.
Has anyone noticed this error (IE7 bug???) as well, any experiences, any suggestions?
Thank you.
Re: Slimbox and FLV player on one page conflicts in IE7
Posted: Wed 30. Jan 2008, 00:06
by Jensensen
Well, so far I did run several tests, even locally and remote with static pages as well, checking error-logs and so on.
One reason seems to [could] be the
order in which the JS libraries
1) occure in the page code and/or!!!
2) are loaded from the server [this vary {see server logs}!!!]
You can click the address directly, go back or --> reload!! more than 3 times and there are [mostly] no problems
with this order
Code: Select all
<script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script>
<script src="template/inc_js/swfobject/swfobject.js" type="text/javascript"></script>
<script src="template/slimbox/js/slimbox.js" type="text/javascript"></script>
but then --> after the fourth reload OR typing the adress OR when you go back --> IE7 crashes.
This are the error screens on my f---n windows machine:
line 193 --> this is slimbox.js
Code: Select all
window.addEvent('domready', Lightbox.init.bind(Lightbox));
Have a look on what the web developer tools in IE7 shows:
view --> original {code}
view --> DOM (page)
KEEP IN MIND:
/changelog.txt
...
2007-08-28
[FIX] >>language="javascript" defer="defer"<< removed from Flash Video Player <script> tag - seems to make problems on IE.
...
it IS still there --> [DOM page view]:
Code: Select all
<SCRIPT id="ie_ready" src="javascript:void(0)" defer></SCRIPT>
BUT this time it has its
origin in --> mootools.js
{check code}
anyway, without this [was tested] --> nothing works...
I even tried with a static page and A LOT OF --> CRLF {windoof line breaks] after:
<script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script> on the page...
Yes, indeed!! [as IE7 DOM page view shows!!]
Code: Select all
<SCRIPT id="ie_ready" src="javascript:void(0)" defer></SCRIPT>
appears below --> other script tags!!!
In this case ----> you can --> [at least] reload half a dozen --> before this error occurs !!!
but unless you hack the code you can't reach this...
My suggestion so far: don't use both: slimbox and FLV media player on ONE page....
Any --> hints!! or
solution would be strongly appreciated...
need help for this... [light{slim}box and flv media player on one page]
Re: Slimbox and FLV player on one page conflicts in IE7
Posted: Wed 30. Jan 2008, 01:45
by DeXXus
Re: Slimbox and FLV player on one page conflicts in IE7
Posted: Wed 30. Jan 2008, 05:20
by Jensensen
Hey DeXXus,
THANK YOU VERY MUCH for directing my attention to this!!
There I could find a solution:
Really strange:
SWFObject conflicts with mootools
It [sometimes] can be fixed simply by putting ---> defer=”defer”.
SINCE THERE IS NO 'defer' in newer versions of 'swfobject.js' another WORKING fix can be found here:
http://www.rednas.be/news/43/swfobject- ... -error-fix
USE
<script type="text/javascript">
window.addEvent('domready', function(){
var so = new SWFObject("movie.swf","mymovie","400","200","8", "#336699");
so.write("flashcontent");
});
</script>
INSTEAD OF
<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
so.write("flashcontent");
</script>
THIS WORKS FINE!!!!!
but, hey, this need some hacks:
/include/inc_front/content/cnt25.article.inc.php
line 166 change --> add
below:
Code: Select all
$fmp_data['script'] = ' <script type="text/javascript">'.LF.SCRIPT_CDATA_START.LF; // language="javascript" defer="defer"
$fmp_data['script'] .= " window.addEvent('domready', function(){".LF;
line 226 change --> add
above:
Code: Select all
$fmp_data['script'] .= LF.' });';
$fmp_data['script'] .= LF.SCRIPT_CDATA_END.LF.' </script>';
Two days later I'm very
again...
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Fri 1. Feb 2008, 07:18
by Oliver Georgi
but the hack is NOT the solution - you always have to be sure that Mootools is loaded otherwise OnDomReady is not accessible.
OK, here is the fixed file (I hope). It always loads Mootools for FlashPlayer too.
http://phpwcms.org/snapshot/20080201_CPfix1.zip
Oliver
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Fri 1. Feb 2008, 20:33
by culda_a
Ok now the error is not apear again but now the flv file is not apear I get this error:
No JavaScript - no Flash Media!
I have just apply the patch offer by oliver, I use phpwcms 1.3.5
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Fri 1. Feb 2008, 22:49
by Oliver Georgi
You will need to have Mootools installed at the right place: template/inc_js/mootools/mootools.js
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Fri 1. Feb 2008, 23:44
by culda_a
it is in the right place: /public_html/template/inc_js/mootools/mootools.js
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Fri 1. Feb 2008, 23:54
by Jensensen
[x]
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 17:40
by culda_a
I don't use wma with flash player I use with multimedia content, so the problem is that now the flash player is not play anymore flv files
here is a imge of the content how is set:
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 19:03
by Oliver Georgi
For me it is still working very well.
So check if Mootools is really loading!!! And that you have JavaScript enabled!
Oliver
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 19:11
by culda_a
For me it is still working very well.
So check if Mootools is really loading!!! And that you have JavaScript enabled!
Oliver
The Java Script is enabled, the mootools is on the right place /public_html/template/inc_js/mootools/mootools.js
I\m not a programer how can I check if is loadind the mootools?
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 19:16
by Jensensen
on that page you PM me you still have an --> ERROR:
</script>
</head>
</html>
<link rel="stylesheet" href="template/slimbox/css/slimbox.css" type="text/css" media="screen" />
<script src="template/inc_js/mootools/mootools.js" type="text/javascript"></script>
<script src="template/slimbox/js/slimbox.js" type="text/javascript"></script>
<script src="template/inc_js/swfobject/swfobject.js" type="text/javascript"></script>
<script src="template/inc_js/AC_WriteActiveX.js" type="text/javascript"></script>
</head>
<body id="myid_13">
<script language="javascript" src="include/inc_js/AnchorPosition.js" type="text/javascript"></script>
<script language="javascript" src="include/inc_js/date.js" type="text/javascript"></script>
<script language="javascript" src="include/inc_js/CalendarPopup.js"></script>
<script language="javascript" src="include/inc_js/PopupWindow.js"></script>
<script language="javaScript" src="include/inc_js/overlib.js"></script>
<script language="javascript" src="include/inc_js/datarequestor-1.6.js"></script>
<script language="javascript" src="include/inc_module/mod_qcal/inc_js/qcal.js"></script>
culda_a wrote:...The Java Script is enabled, the mootools is on the right place /public_html/template/inc_js/mootools/mootools.js
but not in the page code!!!
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 19:46
by Oliver Georgi
Yepp page has many problems - but maybe also one of the other JavaScripts kicks Mootools to heaven!
It's hard to say why this happens - but first create a nearly valid DOM so that Mootools can find the right DIV.
Oliver
Re: [SOLVED] Slimbox and FLV player on one page conflicts in IE7
Posted: Sat 2. Feb 2008, 19:51
by culda_a
The error is corected but the problem with the flash player content is not solved, I have try to put the original files from the snapshot cnt23.article.inc and cnt25.article.inc is working in firefox but with IE is not, I have apply the patch from oliver and is not working allso not in firefox this time