So my problem, as usual, lies with Internet Explorer. I have a link that when clicked is supposed to open a new little window and have a flash payer embedded in it that will play an mp3 file.
Example link:
The javascript that takes care of the onclick (and is linked to in the header):
In every browser and operating system, except IE, this works perfectly. It opens a popup window and plays the mp3 through the flash player. In IE, one of two things happens. If windows media player is set to play your filetypes, it opens the mp3 in windows media player. If not, it opens a normal sized window and just tries to load the mp3 which takes forever. Why the heck does it do this? Why would WMP take over a .swf playing mp3s?
EDIT: Solved by removing href link and replacing with #. Stupid IE :\
Example link:
Code:
<a href="http://www.summitnorthwest.org/sermons/2009/01.17.09.mp3" onclick="javascript:BatmoAudioPop('Puddleglum\'s Perspective',this.href,'1'); return false" target="_blank">Listen to Sermon</a>
The javascript that takes care of the onclick (and is linked to in the header):
Code:
function BatmoAudioPop(filedesc,filepath,WindowNumber)
{
PlayerWin = window.open('',WindowNumber,'width=320,height=230,top=75,left=75,screenX=75,screenY=75,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');
PlayerWin.focus();
PlayerWin.document.writeln("<html><head><title>Audio Sermon Player</title></head>");
PlayerWin.document.writeln("<body bgcolor='#000000'>"); // specify background img if desired
PlayerWin.document.writeln("<div align='center'><img src='http://www.summitnorthwest.org/sermons/summitlogosmall.jpg'><br />");
PlayerWin.document.writeln("<b style ='font-size:18px;color:#d5d5d5;font-family:Lucida,sans-serif;line-height:1.6'>" + filedesc + "</b><br />");
PlayerWin.document.writeln("<object type='application/x-shockwave-flash' data='http://www.summitnorthwest.org/sermons/mp3player.swf' width='250' height='20'>");
PlayerWin.document.writeln("<param name='movie' value='http://www.summitnorthwest.org/sermons/mp3player.swf'>");
PlayerWin.document.writeln("<param name='wmode' value='transparent'>");
PlayerWin.document.writeln("<param name='FlashVars' value='mp3=" + filepath + "&width=250&autoplay=1&showvolume=1&showloading=always&volumewidth=50&volumeheight=8&loadingcolor=B4B6B3&sliderovercolor=0052B6&buttonovercolor=0052B6&sliderwidth=12'>");
PlayerWin.document.writeln("</object></div>");
PlayerWin.document.writeln("<p style='font-size:12px;color:#d5d5d5;font-family:Lucida,sans-serif;text-align:center'><a href='" + filepath +"'>Download this Sermon</a> <span style='font-size:10px;color:#d5d5d5;'>(right-click)</span></p>");
PlayerWin.document.writeln("<form><div align='center'><input type='button' value='Close this window' onclick='javascript:window.close();'></div></form>");
PlayerWin.document.writeln("</body></html>");
PlayerWin.document.close();
}
In every browser and operating system, except IE, this works perfectly. It opens a popup window and plays the mp3 through the flash player. In IE, one of two things happens. If windows media player is set to play your filetypes, it opens the mp3 in windows media player. If not, it opens a normal sized window and just tries to load the mp3 which takes forever. Why the heck does it do this? Why would WMP take over a .swf playing mp3s?
EDIT: Solved by removing href link and replacing with #. Stupid IE :\