Object don't work in FireFox

Discussion in 'JavaScript' started by Alfred_CZ, Sep 23, 2007.

  1. #1
    In <body> I have this code
    <object id="song" name="song" data="file.mp3" type="application/x-mplayer2" width="0" height="0" style="position:absolute;">
    <param name="filename" value="file.mp3">
    <param name="autostart" value="0">
    <param name="playcount" value="1">
    <param name="loop" value="false" /> 
    <param name="repeat" value="false" /> 
    </object>	
    Code (markup):
    I call at OnLoad function play_song() with code
    document.song.Play();
    Code (markup):
    In IE it works fine, but in FireFox and Opera it doesn't work. Have anyone any idea why?
    I tried
    document.applets["song"].Play() 
    Code (markup):
    or
    document.applets[0].Play() 
    Code (markup):
    with the same result.
     
    Alfred_CZ, Sep 23, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    nico_swd, Sep 23, 2007 IP