Java and Browsers (Objects)

K

Kent Feiler

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
(e-mail address removed)
www.KentFeiler.com
 
D

dhek bhun kho

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.
 
K

Kent Feiler

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
(e-mail address removed)
www.KentFeiler.com
 
G

Grant Wagner

Kent said:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top