Results 1 to 4 of 4

Thread: Active X disable click windows media

  1. #1
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Active X disable click windows media

    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.

    Thanks!

  2. #2
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can you please provide a link to that page that shows it ?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    HTML Code:
    </noscript>
    <script type="text/javascript" src="media.js"></script>
    Proper escaping of line breaks should be followed in the script, ex:

    Code:
    document.write('<object>\n\
    <param name="whatever" value="whatever">\n\
    </object>');
    If you have any single quotes (') in your tag(s) - you shouldn't, generally - they must also be escaped, like so:

    Code:
    \'
    Last edited by jscheuer1; 04-26-2007 at 04:04 PM. Reason: spelling
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •