
How to insert a java applet in a web page
I did learn a lot today while trying to validating my new sub domain: http://websitesasgraphs.waltercedric.com/ I found a huge number of examples using the tag <applet> which has been deprecated and create errors and warning in W3C validation engine. But no example using the the new HTML <object> tag. Hence I decide to publish this small post.
The following page are now XHTM 1.0
- display.php (validation Link) XHTML 1.0 Strict
- menu.html (validation link) XHTML 1.0 Transitional
While this one is
- index.html (validation link) HTML 4.01 Frameset
Here is the code to insert a java applet into an XHTML 1.0 Strict web page
<div> <object classid="java:mkv_htmlgraph.class" type="application/x-java-applet" archive="mkv_htmlgraph.jar" width="600" height="600"> <param name="code" value="mkv_htmlgraph" /> <param name="archive" value="mkv_htmlgraph.jar" /> <param name="image" value="loading.gif" /> <param name="boxmessage" value="Loading Processing software..." /> <param name="boxbgcolor" value="#FFFFFF" /> <param name="urlFromForm" value="http://websitesasgraphs.waltercedric.com/getDataFromURL.php?url=&lt;?php echo $url ?>" /> <strong> This browser does not have a Java Plug-in. </strong> <br /> <a href="http://java.sun.com/products/plugin/downloads/index.html"> Get the latest Java Plug-in here. </a> </object> </div>
The source code websiteasgraph.v01.00.00.zip has been changed and is available here: Download now
References
- HTML tag <object> http://www.w3.org/TR/REC-html40/struct/objects.html#edef-OBJECT
- http://www.w3schools.com/tags/tag_doctype.asp
- Character encoding Character sets & encodings in XHTML, HTML and CSS
- Insert Flash http://www.alistapart.com/articles/flashsatay
By the way, I discover huge issues in IE8, less in IE7 with my homepage, none in Opera or Firefox. And since my homepage is currently not valid, I will correct everything to make it XHTML 1.0 compliant today.