Google Answers Logo
View Question
 
Q: XHTML <object> tag, not <applet> tag ( No Answer,   0 Comments )
Question  
Subject: XHTML <object> tag, not <applet> tag
Category: Computers > Internet
Asked by: ouroborosns-ga
List Price: $3.00
Posted: 10 Jun 2004 13:35 PDT
Expires: 10 Jul 2004 13:35 PDT
Question ID: 359351
I have been absolutely pulling my hair out trying to get a java applet
to both validate and run under XHTML 1.1. The java applet is a
panorama applet which I can get to work and validate in Mozilla, but
does not work in Internet Explorer. The code I am using (and which I
think is right) is the following:

<object codebase="java" classid="panorama.class" height="196" width="460" >
<param name="panorama"
value="the-image.jpg"
/>
<!--[if !IE]> Mozilla/Netscape and its brethren -->
<object codebase="java" classid="java:panorama.class" height="196" width="460" >
<param name="panorama"
value="the-image.jpg"
/>
</object>
<!-- <![endif]-->
</object>

The question, therefore, is: How can I make that panorama applet work
and have the page still validate as XHTML? (Note: a sneaky workaround is not
what I'm looking for; instead, I am looking for the W3C intended
working method of embedding java applets into a webpage.)

Clarification of Question by ouroborosns-ga on 10 Jun 2004 13:38 PDT
I forgot to provide the location of the applet:
http://www3.mistral.co.uk/colinp/java11.htm

Request for Question Clarification by palitoy-ga on 11 Jun 2004 05:36 PDT
Your page has this document type:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Should it not be something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Clarification of Question by ouroborosns-ga on 11 Jun 2004 12:21 PDT
Hello, and thank you for asking. I suppose I wasn't as clear as I could be.

The applet in question is located at
http://www3.mistral.co.uk/colinp/java11.htm (also listed above). That
page does not belong to me, it's only where I found the applet; if a
person is interested in attempting to answer my question, that is
where they'd get the applet to experiment with. At present, I have no
page up with the applet in place (since I have not been able to get it
to both work and validate, and I'm being rather stringent about having
my pages validate XHTML 1.1 Strict).

At its simplest, a the code for such a page (and to the best of my
understanding) would be the following (assuming that the .class files
are located in a sub-directory called "java" which is relative to the
directory within which the page is created):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
  <title>Panorama Applet Test Page</title>
 </head>
 <body>
  <div id="top">
   <object codebase="java" classid="panorama.class" height="196" width="460" >
    <param name="panorama" value="the-image.jpg" />
    <!--[if !IE]> Mozilla/Netscape and its brethren -->
    <object codebase="java" classid="java:panorama.class" height="196"
width="460" >
     <param name="panorama" value="the-image.jpg" />
    </object>
    <!-- <![endif]-->
   </object>
  </div>
 </body>
</html>

That code will validate, but it will not run. Why not?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy