Re: java detection test on a webpage with applet




"Oliver Wong" <owong@xxxxxxxxxxxxxx> wrote in message
news:PzO8g.8756$Qq.2061@xxxxxxxxxxx

"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>

It may be _legal_ but it doesn't actually _WORK_ :-) Ditto for using
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 a
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.

The browser I used for my testing was IE6 with SP2 installed. Do you think I
should send Bill Gates a bug report? ;-)

--
Rhino


.



Relevant Pages

  • Re: OT: HTML (WAS: MF having issues?)
    ... Right, the example above, with the tag, comes from web developers inapporpriately depending on undocumented features. ... But let's say I don't actually read the standards, but just try out the tag to see what it does, and I notice that on my particular browser, the tag displays the text in italics. ... So now my HTML page may be broken, for example, if it contained text like this: ...
    (comp.lang.cobol)
  • Re: Can you render and image in ASP.NET?
    ... the client (browser). ... the image bytes back to the browser, you will need an tag in the page ... HTML whose source is the ASPX page that constructs the image. ... > Is there any possibility to render images for the web in asp.net? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Tail a logfile to a web page
    ... > different techniques usable with a web browser. ... A HTML interface ... The page will refresh every nn seconds. ... REFRESH is not a tag. ...
    (comp.infosystems.www.authoring.html)
  • Re: java detection test on a webpage with applet
    ... the applet cannot be displayed in this browser. ... 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. ...
    (comp.lang.java.help)
  • Re: Anyone experienced in express data with figures?
    ... > applet and swing are not necessarily separate things. ... > simple HTML, or the JTable class. ... not every browser has Java installed. ...
    (comp.lang.java.programmer)