Java and Browsers (Objects)

Discussion in 'Java' started by Kent Feiler, Jul 26, 2003.

  1. Kent Feiler

    Kent Feiler Guest

    Other than the question of why there are problems with APPLETs on IE,
    I'm curious as to why there are problems with Java OBJECTs on
    Netscape. W3C has declared OBJECT to be the preferred method of
    playing media in a web page, and yet Netscape doesn't entirely support
    them. Is this more of this geeky war going on between Microsoft and
    Sun?


    Regards,


    Regards,


    Kent Feiler

    www.KentFeiler.com
     
    Kent Feiler, Jul 26, 2003
    #1
    1. Advertising

  2. Kent Feiler <>, Sat, 26 Jul 2003 17:07:00 -0500:

    > Other than the question of why there are problems with APPLETs on IE,
    > I'm curious as to why there are problems with Java OBJECTs on
    > Netscape. W3C has declared OBJECT to be the preferred method of
    > playing media in a web page, and yet Netscape doesn't entirely support
    > them. Is this more of this geeky war going on between Microsoft and
    > Sun?


    Well , I don't think so, or they must be using a very prehistoric netscape
    browser.

    http://www.mozilla.org/quality/browser/front-end/testcases/oji/objecttest5.html


    I find it odd that people are nagging about NS4.7 while nobody supports
    IE4 anymore. Netscape 7.0 is a good and stable browser, personally I use
    the Mozilla version because of the good javascript debugging and DOM
    browser, but the browsers are basically the same.

    Greets
    Bhun.
     
    dhek bhun kho, Jul 27, 2003
    #2
    1. Advertising

  3. Kent Feiler

    Kent Feiler Guest

    On Sun, 27 Jul 2003 00:57:00 GMT, dhek bhun kho
    <> wrote:

    >Kent Feiler <>, Sat, 26 Jul 2003 17:07:00 -0500:
    >
    >> Other than the question of why there are problems with APPLETs on IE,
    >> I'm curious as to why there are problems with Java OBJECTs on
    >> Netscape. W3C has declared OBJECT to be the preferred method of
    >> playing media in a web page, and yet Netscape doesn't entirely support
    >> them. Is this more of this geeky war going on between Microsoft and
    >> Sun?

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >Well , I don't think so, or they must be using a very prehistoric netscape
    >browser.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nope, I'm talking about Netscape 7.1 and Firebird 0.6.
    Using this object:

    <object name="playit"
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codetype="application/java"
    width="200" height="200">
    <param name="code" VALUE = "PlaySound.class">
    <param name="type" VALUE ="application/x-java-applet">
    <param name="scriptable" VALUE = "false">
    </object>

    ....and this Javascript to invoke it

    <script type="text/javascript">
    function sounds ()
    {
    document.playit.playnow('../bin/elephant.au');
    }
    </script>

    Works fine on IE but doesn't work or produce any Java Console messages
    in Netscape or Firebird. If I replace the OBJECT with:

    <applet name="playit" code="PlaySound.class" width="200"
    height="200">
    </applet>

    ....and use the same Javascript it works fine on Netscape/Firebird and
    produces some bizzare security errors on IE.


    Regards,


    Regards,


    Kent Feiler

    www.KentFeiler.com
     
    Kent Feiler, Jul 27, 2003
    #3
  4. Kent Feiler

    Grant Wagner Guest

    Kent Feiler wrote:

    > On Sun, 27 Jul 2003 00:57:00 GMT, dhek bhun kho
    > <> wrote:
    >
    > >Kent Feiler <>, Sat, 26 Jul 2003 17:07:00 -0500:
    > >
    > >> Other than the question of why there are problems with APPLETs on IE,
    > >> I'm curious as to why there are problems with Java OBJECTs on
    > >> Netscape. W3C has declared OBJECT to be the preferred method of
    > >> playing media in a web page, and yet Netscape doesn't entirely support
    > >> them. Is this more of this geeky war going on between Microsoft and
    > >> Sun?

    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > >Well , I don't think so, or they must be using a very prehistoric netscape
    > >browser.

    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > Nope, I'm talking about Netscape 7.1 and Firebird 0.6.
    > Using this object:
    >
    > <object name="playit"
    > classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    > codetype="application/java"
    > width="200" height="200">
    > <param name="code" VALUE = "PlaySound.class">
    > <param name="type" VALUE ="application/x-java-applet">
    > <param name="scriptable" VALUE = "false">
    > </object>
    >
    > ...and this Javascript to invoke it
    >
    > <script type="text/javascript">
    > function sounds ()
    > {
    > document.playit.playnow('../bin/elephant.au');
    > }
    > </script>


    Object tag names aren't in the default document object's namespace in
    Mozilla/Netscape 7, so you can't reference an <object name="blah" ..> using
    document.blah...

    Try changing the <object> tag to be <object name="playit" id="playit" ...>,
    then use:

    function sounds() {
    var theObject;
    if (document.getElementById) { // IE 5.5+, Mozilla, Opera 7+, KHTML
    theObject = document.getElementById('playit');
    } else if (document.all) { // IE 4
    theObject = document.all('playit');
    }

    if (theObject) {
    theObject.playnow(...);
    }
    }

    Note that although I commented "IE 5.5+, Mozilla, Opera 7+, KHTML", I'm only
    indicating that Mozilla, Opera 7 and KHTML based browsers will evaluate true,
    whether they can retrieve the object and invoke methods on it is another
    matter. The above /should/ work in Mozilla, but for the last few builds of
    Mozilla 1.5 Alpha I can't get applets to load properly, so I didn't bother
    testing it.

    > Works fine on IE but doesn't work or produce any Java Console messages
    > in Netscape or Firebird. If I replace the OBJECT with:
    >
    > <applet name="playit" code="PlaySound.class" width="200"
    > height="200">
    > </applet>
    >
    > ...and use the same Javascript it works fine on Netscape/Firebird and
    > produces some bizzare security errors on IE.
    >
    > Regards,
    >
    > Regards,
    >
    > Kent Feiler
    >
    > www.KentFeiler.com


    --
    | Grant Wagner <>
     
    Grant Wagner, Jul 28, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neomorph

    Re: Java and Browsers (loading)

    Neomorph, Jul 27, 2003, in forum: Java
    Replies:
    1
    Views:
    425
    Tor Iver Wilhelmsen
    Jul 28, 2003
  2. 7stud
    Replies:
    11
    Views:
    700
    Dennis Lee Bieber
    Mar 20, 2007
  3. El Kabong

    Browsers, browsers! Quo vadis?

    El Kabong, May 11, 2007, in forum: HTML
    Replies:
    23
    Views:
    907
    dorayme
    May 13, 2007
  4. Steve Drach
    Replies:
    3
    Views:
    212
    Thomas E Enebo
    Jun 20, 2004
  5. Sven Fischer
    Replies:
    0
    Views:
    420
    Sven Fischer
    Sep 27, 2012
Loading...

Share This Page