lutherhert
December 9th, 2002, 03:31 AM
I am placing Java applets in HTML 4.0 web pages. As the appIet tag is deprecated, I want to use the new www.w3c org object tag implementation. I have followed the code implementation as recommended by w3c, but the result is no applet appearing in the object tag implementation.
I need to demonstrate implementing an applet using the object tag. I have looked every where and followed the W3 implementation, which I list here:
13.3.3 Global naming schemes for objects
The location of an object's implementation is given by a URI. As we discussed in the introduction to URIs, the first segment of an absolute URI specifies the naming scheme used to transfer the data designated by the URI. For HTML documents, this scheme is frequently "http". Some applets might employ other naming schemes. For instance, when specifying a Java applet, authors may use URIs that begin with "java" and for ActiveX applets, authors may use "clsid".
In the following example, we insert a Java applet into an HTML document.
<P><OBJECT classid="java:program.start">
</OBJECT>
By setting the codetype attribute, a user agent can decide whether to retrieve the Java application based on its ability to do so.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
</OBJECT>
Some rendering schemes require additional information to identify their implementation and must be told where to find that information. Authors may give path information to the object's implementation via the codebase attribute.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
codebase="http://foooo.bar.com/java/myimplementation/"
</OBJECT>
This is more of the same and it also does not work for me.
This element, supported by all Java-enabled browsers, allows designers to embed a Java applet in an HTML document. It has been deprecated in favor of the OBJECT element.The content of the APPLET acts as alternate information for user agents that don't support this element or are currently configured not to support applets. User agents must ignore the content otherwise.DEPRECATED EXAMPLE: In the following example, the APPLET element includes a Java applet in the document. Since no codebase is supplied, the applet is assumed to be in the same directory as the current document.<APPLET code="Bubbles.class" width="500" height="500">
Java applet that draws animated bubbles.
</APPLET>
This example may be rewritten with OBJECT as follows:<P><OBJECT codetype="application/java"
classid="java:Bubbles.class"
width="500" height="500">
Java applet that draws animated bubbles.
</OBJECT>
Initial values may be supplied to the applet via the PARAM element.DEPRECATED EXAMPLE: The following sample Java applet:<APPLET code="AudioItem" width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</APPLET>
may be rewritten as follows with OBJECT:<OBJECT codetype="application/java"
classid="AudioItem"
width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</OBJECT>
My Web page code is here:
<!-- BEGIN Popup Blocker --> <script language='javascript'> NS_ActualOpen=window.open; function NS_NullWindow(){this.window;} function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());} window.open=NS_NewOpen; </script> <!-- END Popup Blocker --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>Custom sinks, faucets, cabinets </TITLE><META content="text/html; charset=windows-1252" http-equiv=Content-Type><META content="Microsoft FrontPage 4.0" name=GENERATOR><META content=FrontPage.Editor.Document name=ProgId>
</HEAD><BODY ><p> If you do not see the image below, you browser does do not support Java! </p><p> To see moving water move in the sink,move your mouse pointer over the sink!</p><p> This applet code is initiated using the applet syntax.</p>
<APPLET align=center code=PoolMenu.class height=287 width=231><PARAM NAME="image" VALUE="agedcopper.jpg"> <PARAM NAME="align" VALUE="center"> <PARAM NAME="code" VALUE="PoolMenu.class"> <PARAM NAME="height" VALUE="287"> <PARAM NAME="width" VALUE="231"> If you do not see the image, your browser does not support JAVA (sorry)</APPLET>  
Microsoft also allows for the use of the code attribute for the <b>(object)</b> element; code is used to set the URI of the Java class file to include. You pass parameters to the label control using the; <b>(param)</b> elements.In the case of Java, you should use java:.Below, I will attempt to invoke AgedSink applet using the <b>(object tag)</b> and <b>(java:)</b>, because the applet syntax is deprecated. I used Netscape 7.2 to debug the object syntax .Tthe information is listed below. NS and IE browsers do not seem to support the object syntax proposed by the W3C. I have tried to do this using the http site path and the directory path. I still draw a blank on the display. </p>
This is my object tag code, which does not work:
<OBJECT codetype="application/java-archive" classid="java:PoolMenu.class" border="1" width="231" height="287" codebase="http://Inetpub/Javasite/AgedCopperSink/"> <PARAM NAME="image" VALUE="agedcopper.jpg" width="231" height="287"> <PARAM NAME="align" VALUE="center"> <PARAM NAME="code" VALUE="PoolMenu.class"> <PARAM NAME="height" VALUE="287"> <PARAM NAME="width" VALUE="231"> This should display in non-Java aware and Java aware browsers.</OBJECT>
IE leaves a blank and NetScape provides minimal place holders that indicate errors. It appears that I may not ibe providing the proper path to the source code. I have tried using a relative and complete path in the code base. Neither method works.
Or is this a browser compatibility issue to be resolved by the browser vendors?</p>
Below is some information from the www.3c org site:
13.3.3 Global naming schemes for objects
The location of an object's implementation is given by a URI. As we discussed in the introduction to URIs, the first segment of an absolute URI specifies the naming scheme used to transfer the data designated by the URI. For HTML documents, this scheme is frequently "http". Some applets might employ other naming schemes. For instance, when specifying a Java applet, authors may use URIs that begin with "java" and for ActiveX applets, authors may use "clsid".
In the following example, we insert a Java applet into an HTML document.
<P><OBJECT classid="java:program.start">
</OBJECT>
By setting the codetype attribute, a user agent can decide whether to retrieve the Java application based on its ability to do so.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
</OBJECT>
Some rendering schemes require additional information to identify their implementation and must be told where to find that information. Authors may give path information to the object's implementation via the codebase attribute.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
codebase="http://foooo.bar.com/java/myimplementation/"
</OBJECT>
Your help is appreciated.
Luther Hert
--------------------------------------------------------------------------------
I need to demonstrate implementing an applet using the object tag. I have looked every where and followed the W3 implementation, which I list here:
13.3.3 Global naming schemes for objects
The location of an object's implementation is given by a URI. As we discussed in the introduction to URIs, the first segment of an absolute URI specifies the naming scheme used to transfer the data designated by the URI. For HTML documents, this scheme is frequently "http". Some applets might employ other naming schemes. For instance, when specifying a Java applet, authors may use URIs that begin with "java" and for ActiveX applets, authors may use "clsid".
In the following example, we insert a Java applet into an HTML document.
<P><OBJECT classid="java:program.start">
</OBJECT>
By setting the codetype attribute, a user agent can decide whether to retrieve the Java application based on its ability to do so.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
</OBJECT>
Some rendering schemes require additional information to identify their implementation and must be told where to find that information. Authors may give path information to the object's implementation via the codebase attribute.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
codebase="http://foooo.bar.com/java/myimplementation/"
</OBJECT>
This is more of the same and it also does not work for me.
This element, supported by all Java-enabled browsers, allows designers to embed a Java applet in an HTML document. It has been deprecated in favor of the OBJECT element.The content of the APPLET acts as alternate information for user agents that don't support this element or are currently configured not to support applets. User agents must ignore the content otherwise.DEPRECATED EXAMPLE: In the following example, the APPLET element includes a Java applet in the document. Since no codebase is supplied, the applet is assumed to be in the same directory as the current document.<APPLET code="Bubbles.class" width="500" height="500">
Java applet that draws animated bubbles.
</APPLET>
This example may be rewritten with OBJECT as follows:<P><OBJECT codetype="application/java"
classid="java:Bubbles.class"
width="500" height="500">
Java applet that draws animated bubbles.
</OBJECT>
Initial values may be supplied to the applet via the PARAM element.DEPRECATED EXAMPLE: The following sample Java applet:<APPLET code="AudioItem" width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</APPLET>
may be rewritten as follows with OBJECT:<OBJECT codetype="application/java"
classid="AudioItem"
width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</OBJECT>
My Web page code is here:
<!-- BEGIN Popup Blocker --> <script language='javascript'> NS_ActualOpen=window.open; function NS_NullWindow(){this.window;} function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());} window.open=NS_NewOpen; </script> <!-- END Popup Blocker --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>Custom sinks, faucets, cabinets </TITLE><META content="text/html; charset=windows-1252" http-equiv=Content-Type><META content="Microsoft FrontPage 4.0" name=GENERATOR><META content=FrontPage.Editor.Document name=ProgId>
</HEAD><BODY ><p> If you do not see the image below, you browser does do not support Java! </p><p> To see moving water move in the sink,move your mouse pointer over the sink!</p><p> This applet code is initiated using the applet syntax.</p>
<APPLET align=center code=PoolMenu.class height=287 width=231><PARAM NAME="image" VALUE="agedcopper.jpg"> <PARAM NAME="align" VALUE="center"> <PARAM NAME="code" VALUE="PoolMenu.class"> <PARAM NAME="height" VALUE="287"> <PARAM NAME="width" VALUE="231"> If you do not see the image, your browser does not support JAVA (sorry)</APPLET>  
Microsoft also allows for the use of the code attribute for the <b>(object)</b> element; code is used to set the URI of the Java class file to include. You pass parameters to the label control using the; <b>(param)</b> elements.In the case of Java, you should use java:.Below, I will attempt to invoke AgedSink applet using the <b>(object tag)</b> and <b>(java:)</b>, because the applet syntax is deprecated. I used Netscape 7.2 to debug the object syntax .Tthe information is listed below. NS and IE browsers do not seem to support the object syntax proposed by the W3C. I have tried to do this using the http site path and the directory path. I still draw a blank on the display. </p>
This is my object tag code, which does not work:
<OBJECT codetype="application/java-archive" classid="java:PoolMenu.class" border="1" width="231" height="287" codebase="http://Inetpub/Javasite/AgedCopperSink/"> <PARAM NAME="image" VALUE="agedcopper.jpg" width="231" height="287"> <PARAM NAME="align" VALUE="center"> <PARAM NAME="code" VALUE="PoolMenu.class"> <PARAM NAME="height" VALUE="287"> <PARAM NAME="width" VALUE="231"> This should display in non-Java aware and Java aware browsers.</OBJECT>
IE leaves a blank and NetScape provides minimal place holders that indicate errors. It appears that I may not ibe providing the proper path to the source code. I have tried using a relative and complete path in the code base. Neither method works.
Or is this a browser compatibility issue to be resolved by the browser vendors?</p>
Below is some information from the www.3c org site:
13.3.3 Global naming schemes for objects
The location of an object's implementation is given by a URI. As we discussed in the introduction to URIs, the first segment of an absolute URI specifies the naming scheme used to transfer the data designated by the URI. For HTML documents, this scheme is frequently "http". Some applets might employ other naming schemes. For instance, when specifying a Java applet, authors may use URIs that begin with "java" and for ActiveX applets, authors may use "clsid".
In the following example, we insert a Java applet into an HTML document.
<P><OBJECT classid="java:program.start">
</OBJECT>
By setting the codetype attribute, a user agent can decide whether to retrieve the Java application based on its ability to do so.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
</OBJECT>
Some rendering schemes require additional information to identify their implementation and must be told where to find that information. Authors may give path information to the object's implementation via the codebase attribute.
<OBJECT codetype="application/java-archive"
classid="java:program.start">
codebase="http://foooo.bar.com/java/myimplementation/"
</OBJECT>
Your help is appreciated.
Luther Hert
--------------------------------------------------------------------------------