StarDot Knowledge Base

Can I use the Java applet within a <code> tag?

Article ID: 130
Last updated: 11 Jun, 2020

Yes, here is sample code:

<!--[if !IE]> Firefox and others will use outer object -->
<object classid="java:CaptureClient.class" type="application/x-java-applet" width="320" height="253">
<param name="image" value="image.jpg" />
<param name="delay" value="5" /> 
<param name="status" value="2" /> 
<param name="statusText" value="Next live image in %M:%S" />
<param name="statusTextColor" value="#ffffff" /> 
<param name="backgroundColor" value="#000000" /> 
<param name="url" value="http://www.stardot.com" />
<!--<![endif]-->

<!-- MSIE (Microsoft Internet Explorer) will use inner object --> 
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab" width="320" height="253"> 
<param name="code" value="CaptureClient" /> 
<param name="image" value="image.jpg" /> 
<param name="delay" value="5" /> 
<param name="status" value="2" /> 
<param name="statusText" value="Next live image in %M:%S" />
<param name="statusTextColor" value="#ffffff" />
<param name="backgroundColor" value="#000000" />
<param name="url" value="http://www.stardot.com" />
<b>This browser does not have a Java Plug-in.</b><br>
<a href="http://java.sun.com/products/plugin/downloads/index.html">Download the latest Java Plug-in here.</a>
</object>
<!--[if !IE]> close outer object -->
</object> 
<!--<![endif]-->

Tested & works with:

  1. Vista IE8
  2. Vista Chrome 2.0.172.37
  3. Vista Firefox 3.0.5
  4. Mac OS X Safari 4.0.2
  5. Mac OS X Firefox 3.5.1

Does not work with:

  1. Fedora Linux Firefox 3.0.11
Article ID: 130
Last updated: 11 Jun, 2020
Revision: 1
Access: Public
Comments: 0