Re: java detection test on a webpage with applet
- From: "Rhino" <no.offline.contact.please@xxxxxxxxxx>
- Date: Thu, 11 May 2006 19:36:57 -0400
"Oliver Wong" <owong@xxxxxxxxxxxxxx> wrote in message
news:PzO8g.8756$Qq.2061@xxxxxxxxxxx
It may be _legal_ but it doesn't actually _WORK_ :-) Ditto for using
"Rhino" <no.offline.contact.please@xxxxxxxxxx> wrote in message
news:OqN8g.16173$M31.165695@xxxxxxxxxxxxxxxxxxxxxxxx
By following the advice in that link, I was able to get the following to
work:
<APPLET CODE = "com.foo.resume.ResumeApplet.class" CODEBASE = "." ARCHIVE
=
"jar/ResumeApplet.jar" WIDTH = "620" HEIGHT = "466" ALIGN = "baseline">
Sorry, the applet cannot be displayed in this browser.
</APPLET>
The "sorry" text was somewhat lost among the other text on the page since
it was the same font so I tried:
<APPLET CODE = "com.foo.resume.ResumeApplet.class" CODEBASE = "." ARCHIVE
=
"jar/ResumeApplet.jar" WIDTH = "620" HEIGHT = "466" ALIGN = "baseline">
<h1>Sorry, the applet cannot be displayed in this browser.</h1>
</APPLET>
That did NOT work; no paragraph appeared and there was no error message.
However, this DID work:
<APPLET CODE = "com.foo.resume.ResumeApplet.class" CODEBASE = "." ARCHIVE
=
"jar/ResumeApplet.jar" WIDTH = "620" HEIGHT = "466" ALIGN = "baseline">
<em>Sorry, the applet cannot be displayed in this browser.</em>
</APPLET>
The following approach also worked, which should please the original
poster because it includes a link. Naturally, he/she will probably want a
more appropriate message and a link that goes somewhere more relevant.
<APPLET CODE = "com.foo.resume.ResumeApplet.class" CODEBASE = "." ARCHIVE
= "jar/ResumeApplet.jar" WIDTH = "620" HEIGHT = "466" ALIGN = "baseline">
<a href="http://yahoo.com">Sorry, the applet cannot be displayed in this
browser.</a>
</APPLET>
I'm surprised that certain things don't work. My understanding of HTML
is that if the browser doesn't recognize a tag, it simply ignores it, so
if the browser doesn't know about the APPLET tag, it should simply treat
the document as if the tag was not there, and thus anything that's legal
without the APPLET tag should be legal with it.
Anyway, the W3C is the final authority on what is and isn't legal HTML.
I've used the validator available at http://validator.w3.org/ and the
following is legal according to HTML 4.1 Transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>foo</title></head>
<body>
<APPLET CODE = "com.foo.resume.ResumeApplet.class" CODEBASE = "." ARCHIVE
=
"jar/ResumeApplet.jar" WIDTH = "620" HEIGHT = "466" ALIGN = "top">
<h1>Sorry, the applet cannot be displayed in this browser.</h1>
</APPLET>
</body>
</html>
paragraph tags: in both cases, the sentence doesn't get displayed. But when
I omitted any tags from specifically around the sentence and when I used
embed tags, it worked fine. I don't know WHY it behaved that way; I'm just
saying that is what happened.
Of course, that doesn't help your users if they happen to be using aThe browser I used for my testing was IE6 with SP2 installed. Do you think I
webbrowser which doesn't comply to the standards. Depending on who wrote
the browser, you may be able to contact them and ask them to fix this bug
in their HTML parser.
should send Bill Gates a bug report? ;-)
--
Rhino
.
- Follow-Ups:
- Re: java detection test on a webpage with applet
- From: Oliver Wong
- Re: java detection test on a webpage with applet
- References:
- java detection test on a webpage with applet
- From: apa-sf
- Re: java detection test on a webpage with applet
- From: Rhino
- Re: java detection test on a webpage with applet
- From: apa-sf
- Re: java detection test on a webpage with applet
- From: Oliver Wong
- Re: java detection test on a webpage with applet
- From: Rhino
- Re: java detection test on a webpage with applet
- From: Oliver Wong
- java detection test on a webpage with applet
- Prev by Date: Re: Stack overflows running JDK 1.3.1 on Fedora Core 2
- Next by Date: Regarding Hashtable....
- Previous by thread: Re: java detection test on a webpage with applet
- Next by thread: Re: java detection test on a webpage with applet
- Index(es):
Relevant Pages
|