Click to See Complete Forum and Search --> : Activex Reactivation Issue


magtree
08-01-2006, 10:29 PM
I have been putting up audio clips for a church website. My method has been to (1) Have a list which links to a *.m3u file (essentially a playlist file), (2) this file calls a page on which I have used the <EMBED> tag set so as to automatically play the audio in pseudo-streaming.

The HTML on one page as an example is:

<div align="center">
&nbsp;
<embed src=announcements.m3u height="45" width="200"
autostart="true" align="absmiddle"
type="audio/mpeg"/>
</div>

It works quite well, I think. The problem is that the <EMBED> tag calls the EOLAS Activex Activation Box each time IE is used. (It works normally in FireFox, Netscape and Opera).

MS has offered a partial solution, i.e., to call the player from a javascript, and remove the <EMBED> function from the HTML. The one I use for the above is:

document.write('<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="250" height="45" />');
document.write('<param name="URL" value="announcements.mp3">');
document.write('<param name="autoStart" value="-1">');
document.write('<param name="type" value="audio/mpeg"></object>');

This too works well - at least for IE; no other browser appear to be able to read it. Thus it requires EVERY page to have one for IE and one for "all other browsers." It also requires every page to have a separate js file. It is a great deal of duplication!

My URL - to see how I have had to set this up - is at:

www.magtreedesigns.com/pop/audio/audio_list.html

There you will see the different link that is needed to play each track.

Is there any way to leave the <EMBED> tags in place, and use a single javascript to inactivate the very annoying little drop down "Active x" box? I have read a number of solutions that deal with FLASH, but trying it in this scenario, i.e., the <EMBED> tag - those solutions don't seem to work.

I would appreciate any help on this.
Many thanks,
Al

raviganesh91221
08-03-2006, 07:07 AM
Try this one. Add this Javascript to ur source folder and call this in ur HTML page

//ediy v2
n=navigator.userAgent;
w=n.indexOf("MSIE");
if((w>0)&&(parseInt(n.charAt(w+5))>5)){
T=["object","embed","applet"];
for(j=0;j<2;j++){
E=document.getElementsByTagName(T[j]);
for(i=0;i<E.length;i++){
P=E[i].parentNode;
H=P.innerHTML;
P.removeChild(E[i]);
P.innerHTML=H;
}}}

magtree
08-03-2006, 08:41 AM
Thank you for the suggestion.

(1) I uploaded your suggested js. file (named it "workaround.js") in the same folder as the page.

(2) Put a reference to the script, i.e., <script src="workaround.js"></script> in the HTML just below the <embed> portion, i.e.,
-------------------
<tr>
<td width="486"><div align="center">
&nbsp;
<embed src=announcements.m3u height="45" width="200"
autostart="true" align="absmiddle"
type="audio/mpeg"/>
</div></td>
</tr>
<script src="workaround.js"></script>
<tr>
-----------------
(3) After upload, when I used IE to open, the activex box appeared and the audio began. When I clicked on the activex box, the page closed down and a message to "send to microsoft, etc." appeared.

(4) With the script in place, the page opened and played fine in FireFox. Problem was with IE.

I have left the page in place so that if you access it with IE, you should see the same issue as I described above.

www.magtreedesigns.com/pop/audio/audio_1/announcements.htm

Did I somehow set this up incorrectly?
Many thanks,
Al

raviganesh91221
08-03-2006, 08:44 AM
Its working fine here. Maybe u hav to do a seciruty update. Then check it. It works fine for me both in IE and firefox.

magtree
08-04-2006, 08:03 AM
Many thanks for checking it, and I am glad to hear that it is working. As you suggest, perhaps the problem is in the IE I'm using to test the site? I'll check it on some other IEs as well, and see if I can find out why my IE is having a problem. Thanks, Al