Compatibility problem with Firefox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajiv07
    New Member
    • Jun 2007
    • 141

    Compatibility problem with Firefox

    [CODE=html]<html>
    <head>
    <title><%=strTi tle%></title>
    <script language="JavaS cript"> <!--

    var message="Sorry, that function is disabled.";


    function onKeyDown(e) {
    if (event.keyCode == 122) {
    event.keyCode = 0;
    event.returnVal ue = false;
    alert(message);
    }
    }


    function click(e) {
    if (document.all) {
    if (event.button == 2) {
    alert(message);
    return false;
    }
    }
    if(event.button == 4)
    {
    alert(message);
    }


    if (document.layer s) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layer s) {
    document.captur eEvents(Event.M OUSEDOWN);
    }
    document.onmous edown=click;

    if (document.layer s) {
    document.captur eEvents(Event.K EYDOWN);
    }
    document.onkeyd own=onKeyDown;

    // --> </script>
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0 ">
    <div align="center">
    <font face=arial size=1 color=#000000>< %=strTitle%></font>
    <OBJECT
    ID="mediaPlayer "
    CLASSID="CLSID: 22d6f312-b0f6-11d0-94ab-0080c74c7e95"
    CODEBASE="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.cab#Ve rsion=5,1,52,70 1"
    STANDBY="Loadin g Microsoft Windows Media Player components..."
    TYPE="applicati on/x-oleobject">
    <PARAM NAME="fileName" VALUE="<%=strFu llPath%>">
    <PARAM NAME="invisible " VALUE="true">
    <PARAM NAME="animation atStart" VALUE="false">
    <PARAM NAME="autoStart " VALUE="true">
    <PARAM NAME="showContr ols" VALUE="true">
    <PARAM NAME="ShowStatu sBar" VALUE="true">
    <PARAM NAME="allowScan " VALUE="true">
    <PARAM NAME="transpare ntatStart" VALUE="true">
    <embed menu="true" QUALITY="best" ShowStatusBar=" true" width=305 height=90 loop="false" autostart="true "></embed>
    </OBJECT>
    </div>
    </body>
    [/CODE]
    This Html file i am using to play Sample WMA file in my site.Its working in IE but its not play in FireFox.Please suggest me if you have any idea.

    Regards
    Rajiv
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you just cannot embed activeX controls in other browsers ... this will only! work with IE ...

    kind regards

    PS: and btw. i would never recommend to use such an annoying 'don't-right-click-me'-script ... it's bad ui-design since it doesn't really avoid what it should avoid and it overrides learned behaviour by the user ... so it is annoying and useless too ...

    Comment

    • rajiv07
      New Member
      • Jun 2007
      • 141

      #3
      Thanks Gits and sorry to take long time to reply

      Could you suggest me any other method to embed WMA file in HTML.Because i want to display WMA file in my site.

      Regards
      Rajiv

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        i'm not very familiar with such multimedia-like content in webpages since that always requires plugins that are not necessarily available at the clients machines ... but i guess you could try to create a flashmovie and use a flashplayer for that ... and i assume with that you would have the most support in browsers and operating systems where the browser is executed ... note: since i use a mac for example i couldn't use wma files unless i would download an additional codec-pack ... and i always find it annoying to make things at a page work for myself ... because it would be bad ui-design. you could even try to detect the ability to play wma-files (don't ask me how ;) - i don't know) ... and just use another good page for those who cannot use your wma-content to avoid to possibly force the user to download codecs or whatever ...

        kind regards

        Comment

        Working...