HTML and CSS Reference
In-Depth Information
Add a codebase attribute pointing to the version of the Java plug-in you want to useā€”for instance,,4,0,mn for Java 1.4.
Other attributes and child elements can remain in place.
The resulting object will work in Internet Explorer, but not in most other browsers. For that, we need a second
object element. To prevent IE from seeing it and becoming confused, we first have to wrap it in IE conditional
<!--[if !IE]> -->
<object ...>
<!-- <![endif]-->
In this object element we make the following changes:
Change applet to object in both the start- and end-tags.
Remove the code attribute.
Add a classid="java: fully.package.qualified.classname " attribute.
Add a type="application/x-java-applet" attribute.
Move the codebase attribute (if any) into a param child element with a name="codebase" attribute. The
value attribute of this param element should have the actual codebase as its value.
Remove the codebase attribute.
Change the object attribute (if any) to a data attribute with the same value.
Finally, put the non-IE object element inside the IE object element and use this to replace the applet
This has focused on the Java-specific changes. You may also need to move some presentational attributes into
CSS. In particular, the align attribute turns into a CSS float property, and the hspace and vspace attributes
are replaced by padding properties. Table 4.6 summarizes.
Table 4.6. Converting applet to object
applet Attribute
object Attribute
CSS Property
<param name="codebase"
value=" url " />
Search WWH ::

Custom Search