Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > OK on Internet Explorer; KO on Firefox

Reply
Thread Tools

OK on Internet Explorer; KO on Firefox

 
 
Ubi
Guest
Posts: n/a
 
      07-24-2007
I have a visualization problem on Firefox.

On Internet Explorer, it works fine.


http://www.listentoeurope.com/giardi...iding_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


 
Reply With Quote
 
 
 
 
David Mark
Guest
Posts: n/a
 
      07-24-2007
On Jul 24, 9:32 am, "Ubi" <(E-Mail Removed)> wrote:
> I have a visualization problem on Firefox.
>
> On Internet Explorer, it works fine.
>
> http://www.listentoeurope.com/giardi...iding_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);
}

 
Reply With Quote
 
 
 
 
Ubi
Guest
Posts: n/a
 
      07-25-2007
Hi David!

You are absolutely right!
Now it works!

Thanks a lot.

Daniele

"David Mark" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed) ups.com...
> On Jul 24, 9:32 am, "Ubi" <(E-Mail Removed)> wrote:
>> I have a visualization problem on Firefox.
>>
>> On Internet Explorer, it works fine.
>>
>> http://www.listentoeurope.com/giardi...iding_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);
> }
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8: C:\Program Files\Internet Explorer\iexplore.exe vs C:\Program Files (x86)\Internet Explorer\iexplore.exe Nathan Sokalski Windows 64bit 16 02-22-2010 08:31 AM
Firefox/Linux import bookmarks from Firefox/Windows? Marek Williams Firefox 2 06-11-2005 04:22 PM
Yahoo! Toolbar Beta for Firefox - Not Compatible with Firefox 1.0.2? NA Firefox 6 04-02-2005 06:13 PM
Firefox gamed - Drudge getting around Firefox popup blocker Venger Firefox 10 12-22-2004 04:37 AM
so what does IE or any of the IE shells have over firefox ? (any anti firefox ppl bother looking at recent plugins available?) *ProteanThread* Firefox 12 10-20-2004 08:31 AM



Advertisments