Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML code to show applet?

 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am new to this forum and I have a question for you guys.
My question regarding the HTML to display a Java applet in browser:
- is <applet> tag deprecated and shouldn't be used any more, right?
- instead we should use <object> tag. I am wondering whether the <object> tag is cross browser or not? Do we need to write some javascript code to tackle for different browsers on different operating systems?

Because I have seen some javascript code like this:



Is the checking of browser and OS needed?

Thanks in advance.
 
Tim Moores
Bartender
Posts: 2729
36
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I advise to use the <applet> tag and nothing else; <object> is outdated.

Alternatively, if you can require JavaScript, use the deployJava.js script: http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#appletTagAttributes
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the deployJava.js to write the applet element. It takes care of the details, and is maintained by Oracle.
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:I advise to use the <applet> tag and nothing else; <object> is outdated.


Thanks for your reply, but I think you are wrong, since <applet> tag is deprecated according to this. The <object> tag has come as a replacement.
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew Thompson wrote:Use the deployJava.js to write the applet element. It takes care of the details, and is maintained by Oracle.


Thank you for the useful link
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haina Soft wrote:
Andrew Thompson wrote:Use the deployJava.js to write the applet element. It takes care of the details, and is maintained by Oracle.


Thank you for the useful link


A good way to indicate usefulness is to click the '+1' button on the top of the post. ;)
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew Thompson wrote:
A good way to indicate usefulness is to click the '+1' button on the top of the post. ;)


Fine. I gave you +1!
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haina Soft wrote:

Thanks for your reply, but I think you are wrong, since <applet> tag is deprecated according to this. The <object> tag has come as a replacement.


Sorry, I correct my statement above: although the W3C states that the <applet> tag is deprecated, Oracle Sun still recommends developer to user it because the <object> tag is implemented inconsistently among browsers.
 
Tim Moores
Bartender
Posts: 2729
36
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Further bit of advice: Don't ever trust w3schools.com, its content is as bad as roseindia.net.
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Further bit of advice: Don't ever trust w3schools.com, its content is as bad as roseindia.net.


Had to +1 that comment, but it has prompted me to jump back into the thread.

  • For information on HTML, I refer to the W3C site (quite distinct from W3Schools)
  • Here is the W3C mention of applet in HTML 4.01, note particularly: "APPLET is deprecated (with all its attributes) in favor of OBJECT." That was when HTML 4.01 was introduced (a long time ago).
  • Sun (now Oracle) can also generally not be trusted for advice on HTML, though they are right about the object element being inconsistently supported.
  • All the expertise Oracle has on deploying applets is invested in the deployJava.js that has now been mentioned by both of us that offered answers.

  • So why are we still discussing raw HTML?

    (Oh, and I still use the applet element for the applet viewer and simple tests, but for real World Wild Web deployment, it is deployJava.js all the way.)
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic