Jump to content
xisto Community
Sign in to follow this  
beeseven

What Is The Xhtml 1.1 Code To Embed An Applet?

Recommended Posts

I've been doing a lot of java stuff recently and some is pretty neat, so I'd like to put it on the internet. I'm using XHTML 1.1 for all my pages, though, and according to W3Schools <applet> doesn't exist anymore and to use object.

 

It's not working, though. There are a bunch of attributes (http://www.w3schools.com/tags/tag_object.asp) and I have no idea which things I need to use. Which do I put for an applet?

Share this post


Link to post
Share on other sites

I'm not an XHTML expert, but I think you will find this excerpt from http://forums.xisto.com/no_longer_exists/ interesting.

The <object> Tag
The primary means for including embedded content in a document is with the <object> tag. It had been created to replace both the <embed> and the <applet> tags. With XHTML, the <applet> tag has been revived, but not the <embed> tag.

The <object> tag allows you to embed an object in a document. This object can be static or it can be executable.

If the object is data for a plugin the browser has available, you can just specify the data to be processed. If the object is and external program, you can specify both the program name and location and the data it is supposed to process.

You use the classid attribute to specify the name of an applet to be loaded, and the codebase to specify an address for it (classid will take a full URL, but this split is from older methods of invoking applets). You can also specify a codetype to identify the MIME-type of the applet.

The data attribute specifies the location of data to go with the applet. The type attribute specifies the MIME-type for this, not the applet.

The <object> tag also has an end tag. It takes two forms of content. One is alternate content if the object cannot be loaded. The other is a series of <param> tags that can be used to pass parameters to the applet.

Here is a sample where an image has been embedded using the following. Note that such things as width, height and border can be specified directly within the tag. Also note that Explorer does not quite render it correctly, putting it in a window with scroll bars. This tag, as used below, currently only works in Explorer.

<object data="../../images/banner_opera.gif"     width="466" height="60"  type="image/gif">A sample image embedded with an <object> tag.</object>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.