View Full Version : Dynamic content wont load in IE when there is flash content on the page?

11-12-2010, 11:37 AM

I have hit a problem with IE.

I have external pages that are loaded in using javascript when a link is clicked. This works absolutely fine in all browsers apart from IE!

It is only the external page which contains the flash audio player that will not load? All the other pages load fine.

I have Youtube videos and fancybox working on the pages fine but as soon as I add flash content they stop loading in IE?

The link is http://www.hm-designs.co.uk/crossland2/solo.php

If you click on Tara - Female vocalist in the left column you will see what I mean.

Does anyone know why IE is doing this?

Thank you in advance for any help anyone can offer,
Helen :thumbsup:

11-12-2010, 12:31 PM
IE7 is throwing an error at line 78:

'type': 'iframe',
'width': 450,
'height': 600,
'hideOnContentClick': false,
'overlayShow' : true,
'overlayOpacity': 0.7,
'overlayColor': '#000',


Try removing that trailing comma and see what happens.

11-12-2010, 12:58 PM
no its still the same :(

11-12-2010, 01:05 PM
Hmm. What are you seeing now then?

Before you removed that comma, IE7 loaded the linked page in the browser, not via AJAX - so just the unstyled content of the linked page was displayed. Now it loads the content OK.

Are you using IE8?

11-12-2010, 01:23 PM
yes its IE8, i dont have IE7 installed.:(

11-12-2010, 02:58 PM
OK, no promises on this one...

..it seems IE has a problem with loading flash via AJAX. However, there is a jQuery flash plugin which might do the trick for you.

So, if you want to try it you need to do the following:

1. Download and install the jQuery SWFObject plugin (http://jquery.thewikies.com/swfobject/). Load this javascript on your solo.php page not the artist page.

2. On your tara.htm page, rip out all the flash stuff. Specifically replace this:

<div id="tab1" class="tab_content">
<object type="application/x-shockwave-flash" data="mp3player.swf?playlist=artiste/tara/tara.xml"
width="280" height="280" wmode="transparent">

<param name="movie" value="mp3player.swf?playlist=artiste/tara/tara.xml" />
<param name="wmode" value="transparent" />


with this, adding the flash value as a title attribute of the div:

<div id="tab1" title="http://www.hm-designs.co.uk/crossland2/mp3player.swf?playlist=/artiste/tara/tara.xml/" class="tab_content"></div>

3. Then, back on solo.php, add the following line:

$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content

//On Click Event
$("ul.tabs li").click(function() {

Explanation: Flash is a problem here, and regardless of AJAX it's better to use SWFObject (http://code.google.com/p/swfobject/) to embed flash. The plugin here bundles it up nicely so it works with jQuery, which allows us to remove all of the flash from the page you're loading with ajax. Instead we just store the reference to the flash object as the div title, and then in the callback event on your solo.php page we read the title attribute and use it to load a flash object.

I have limited experience with Flash, so am not coming from a position of authority here. However, the logic seems a reasonably neat way of doing it. It does work on my test code (haven't tried IE8, but it gets round a similar issue I came across with IE7).

If not all artistes have a flash player then you might want to make the jQuery flash load conditional. Also, the code here assumes that if there is flash content, then it's in #tab1.

Good luck....:D

11-12-2010, 03:29 PM
Yes that has worked, thank you :D It is loading the page and displaying the flash player but even though the path to the XML file is correct it is saying it cant find it!

I'll plod on and see if I can find a solution to the problem, thank you again for your help, you're a superstar :thumbsup:

Thank you

11-12-2010, 03:34 PM
Try making your title:


I added the full url when testing - you don't need it.

11-12-2010, 03:36 PM
yes I know I tried that too, and it still doesnt work. It says it cant find the XML file :confused:

11-12-2010, 03:38 PM
Are you sure, when I make the change in Firebug it works for me. You need to remove that first slash:




11-12-2010, 03:49 PM

Thank you