OK on Internet Explorer; KO on Firefox

Discussion in 'Javascript' started by Ubi, Jul 24, 2007.

  1. Ubi

    Ubi Guest

    I have a visualization problem on Firefox.

    On Internet Explorer, it works fine.


    http://www.listentoeurope.com/giardini_di_miro/dividing_opinions


    By clicking on the Promo Tracks links ("audio" and "video"), a Javascript
    function is invoked


    This function, sets the display property of the PlayerDiv to "block", and
    sets the src of the enclosed iframe to a certain url.

    ....
    <div id="playerDiv" align="center" style="display:none">
    <br style="line-height:5px">
    <iframe name="player" id="player" src="/player/player.php" width="350"
    height="0" frameborder="0" scrolling="no" marginwidth="0"
    marginheight="0"></iframe>
    </div>
    ....


    In the iframe, either an embedded audio player (in case of an "audio" link)
    or an embedded youtube player (in case of a "video" link), appears.

    On Internet Explorer, everything works fine.
    On Firefox, you can listen to the audio, but you cannot display the player.



    Thanks for your help!


    Daniele
     
    Ubi, Jul 24, 2007
    #1
    1. Advertising

  2. Ubi

    David Mark Guest

    On Jul 24, 9:32 am, "Ubi" <> wrote:
    > I have a visualization problem on Firefox.
    >
    > On Internet Explorer, it works fine.
    >
    > http://www.listentoeurope.com/giardini_di_miro/dividing_opinions
    >
    > By clicking on the Promo Tracks links ("audio" and "video"), a Javascript
    > function is invoked
    >
    > This function, sets the display property of the PlayerDiv to "block", and
    > sets the src of the enclosed iframe to a certain url.
    >
    > ...
    > <div id="playerDiv" align="center" style="display:none">
    > <br style="line-height:5px">
    > <iframe name="player" id="player" src="/player/player.php" width="350"
    > height="0" frameborder="0" scrolling="no" marginwidth="0"
    > marginheight="0"></iframe>
    > </div>
    > ...
    >
    > In the iframe, either an embedded audio player (in case of an "audio" link)
    > or an embedded youtube player (in case of a "video" link), appears.
    >
    > On Internet Explorer, everything works fine.
    > On Firefox, you can listen to the audio, but you cannot display the player.


    You should have posted this code:

    function youtube(code,title) {
    var playerDiv = document.getElementById('playerDiv');
    playerDiv.style.display = 'block';
    var player = document.getElementById('player');
    player.style.height = '280';

    // The above line should be player.style.height = '280px';
    // And make sure you check if player and playerDiv exist before
    setting their properties.

    player.src = '/player/player.php?type=youtube&code='+code
    +'&title='+escape(title);
    }
     
    David Mark, Jul 24, 2007
    #2
    1. Advertising

  3. Ubi

    Ubi Guest

    Hi David!

    You are absolutely right!
    Now it works!

    Thanks a lot.

    Daniele

    "David Mark" <> ha scritto nel messaggio
    news:...
    > On Jul 24, 9:32 am, "Ubi" <> wrote:
    >> I have a visualization problem on Firefox.
    >>
    >> On Internet Explorer, it works fine.
    >>
    >> http://www.listentoeurope.com/giardini_di_miro/dividing_opinions
    >>
    >> By clicking on the Promo Tracks links ("audio" and "video"), a Javascript
    >> function is invoked
    >>
    >> This function, sets the display property of the PlayerDiv to "block", and
    >> sets the src of the enclosed iframe to a certain url.
    >>
    >> ...
    >> <div id="playerDiv" align="center" style="display:none">
    >> <br style="line-height:5px">
    >> <iframe name="player" id="player" src="/player/player.php" width="350"
    >> height="0" frameborder="0" scrolling="no" marginwidth="0"
    >> marginheight="0"></iframe>
    >> </div>
    >> ...
    >>
    >> In the iframe, either an embedded audio player (in case of an "audio"
    >> link)
    >> or an embedded youtube player (in case of a "video" link), appears.
    >>
    >> On Internet Explorer, everything works fine.
    >> On Firefox, you can listen to the audio, but you cannot display the
    >> player.

    >
    > You should have posted this code:
    >
    > function youtube(code,title) {
    > var playerDiv = document.getElementById('playerDiv');
    > playerDiv.style.display = 'block';
    > var player = document.getElementById('player');
    > player.style.height = '280';
    >
    > // The above line should be player.style.height = '280px';
    > // And make sure you check if player and playerDiv exist before
    > setting their properties.
    >
    > player.src = '/player/player.php?type=youtube&code='+code
    > +'&title='+escape(title);
    > }
    >
     
    Ubi, Jul 25, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cmay
    Replies:
    0
    Views:
    1,136
  2. Thorben Grosser

    CSS + Firefox + Internet Explorer

    Thorben Grosser, Feb 14, 2005, in forum: HTML
    Replies:
    5
    Views:
    566
    dorayme
    Feb 19, 2005
  3. Joker7
    Replies:
    6
    Views:
    6,833
    Joker7
    Apr 1, 2005
  4. Ed Hauptman
    Replies:
    7
    Views:
    1,020
    Ed Hauptman
    Aug 7, 2009
  5. John Smith
    Replies:
    1
    Views:
    145
    Evertjan.
    Mar 12, 2005
Loading...

Share This Page