Announcement

Collapse
No announcement yet.

Popup window for audio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Popup window for audio

    Yes, that lovely word Javascript here. Now this works fine in IE, but for Firefox it doesn't want to play the MP3 in question. The embeded bar doesn't appear and there's no sound. Anyone care to show how I need to rewrite it to get it to work properly?

    (I'm assuming my Firefox setup is okay. Javascript is on, MP3 plug in present and so on)


    var uniqueid = 314
    var newwinoffset = 0

    function audioplayeropen(soundfiledesc,soundfilepath) {

    playwin = window.open('',uniqueid,'width=320,height=170,top= ' + newwinoffset +',left=0,right=0,resizable=0,scrollbars=0,titleba r=0,toolbar=0,menubar=0,status=0,directories=0,per sonalbar=0');

    playwin.focus();
    var wincontent = "<html><head><title>" + soundfiledesc + "</title></head><body bgcolor='#cdcdcd'>";

    wincontent += "<center><div><img src='../images/logo.gif'></div></center>";

    wincontent += "<object width='300' height='42'>";
    wincontent += "<param name='src' value='" + soundfilepath + "'>";
    wincontent += "<param name='autoplay' value='true'>";
    wincontent += "<param name='controller' value='true'>";
    wincontent += "<param name='bgcolor' value='#cdcdcd'>";

    wincontent += "<embed src='" + soundfilepath + "' autostart='true' loop='false' width='300' height='42' controller='true' bgcolor='#cdcdcd'></embed>";
    wincontent += "</object>";

    wincontent += "</body></html>";

    playwin.document.write(wincontent);

    playwin.document.close();

    uniqueid = uniqueid + 1

    }
    Lie with passion and be forever damned...
Working...
X