Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using applet to write to HTML page

 
Ali Kiyani
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

How do I write to a HTML page using applet? Let's say I want to print "Hello World" through applet which will be displayed inside a <div> tag in HTML, how do I do that?

Thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20764
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do it with Javascript.

You'll have to put suitable Javascript code in the page which allows that to happen, then you can have the applet call Javascript functions. I haven't done that myself but it's certainly possible.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, Javascript is not required. The page DOM can be manipulated via the Common DOM API. The AppletsFaq links to an article about that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic