View Full Version : Active X disable click windows media

04-26-2007, 03:13 PM
I know the script that Adobe produced that will allow Active X content to run on IE without clicking. But this is only for Flash content. Is there a similar script for Windows Media Player? I've tried to reproduce the Adobe code for Windows Media but no luck. I'm not that advanced in JavaScript.


04-26-2007, 03:30 PM
Can you please provide a link to that page that shows it ?

04-26-2007, 03:31 PM
That adobe script is a bit of overkill. It is so complex because it is written to support just about any flash tag(s) you could come up with and is designed to work in other browsers besides IE (like Opera) that also have this 'click to activate' issue.

What you can do is simply take your tag(s) and surround them in a <noscript></noscript> tag so that non-javascript enabled users will still see the content, albeit with that 'click to activate' nonsense. Then make a script with your tag(s) in it:

document.write('<object etc....');

Save that as an external script (text only file) - say media.js, and place the tag for it after the closing </noscript> tag:

<script type="text/javascript" src="media.js"></script>

Proper escaping of line breaks should be followed in the script, ex:

<param name="whatever" value="whatever">\n\

If you have any single quotes (') in your tag(s) - you shouldn't, generally - they must also be escaped, like so:


04-26-2007, 03:50 PM
Sweet! Thanks Jscheuer1. Worked great!

Btw, I'm creating this for in-house training that uses around 30 enormous video files. So it's not online.