Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Dynamic content wont load in IE when there is flash content on the page?

    Hello,

    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

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    IE7 is throwing an error at line 78:

    Code:
    	$("a.iframe").fancybox({
    		 'type': 'iframe',
    		 'width': 450,
    		 'height': 600,
    		'hideOnContentClick': false,
    		'overlayShow'	:	true,
    		'overlayOpacity': 0.7,
    		'overlayColor': '#000',
    		
    	});
    Try removing that trailing comma and see what happens.

  • #3
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts
    no its still the same

  • #4
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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?

  • #5
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts
    yes its IE8, i dont have IE7 installed.

  • #6
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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. 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:

    Code:
    <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" />
      </object>
     
        </div>
    with this, adding the flash value as a title attribute of the div:

    Code:
        <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:

    Code:
                    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
                    $(".tab_content:first").show(); //Show first tab content
    	        $('#tab1').flash($('#tab1').attr('title'));
                
                    //On Click Event
                    $("ul.tabs li").click(function() {
    Explanation: Flash is a problem here, and regardless of AJAX it's better to use 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....
    Last edited by SB65; 11-12-2010 at 02:01 PM.

  • #7
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Yes that has worked, thank you 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

    Thank you

  • #8
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Try making your title:

    Code:
    mp3player.swf?playlist=artiste/tara/tara.xml
    I added the full url when testing - you don't need it.

  • #9
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts
    yes I know I tried that too, and it still doesnt work. It says it cant find the XML file

  • #10
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Are you sure, when I make the change in Firebug it works for me. You need to remove that first slash:

    Code:
    mp3player.swf?playlist=artiste/tara/tara.xml
    not

    Code:
    mp3player.swf?playlist=/artiste/tara/tara.xml

  • #11
    New Coder
    Join Date
    Sep 2010
    Location
    Bradford, West Yorkshire
    Posts
    26
    Thanks
    6
    Thanked 0 Times in 0 Posts



    Thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •