aspose file tools
The moose likes Applets and the fly likes Using applet to write to HTML page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Using applet to write to HTML page" Watch "Using applet to write to HTML page" New topic
Author

Using applet to write to HTML page

Ali Kiyani
Greenhorn

Joined: Sep 15, 2005
Posts: 7
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
Bartender

Joined: Oct 14, 2005
Posts: 19102
    
    8

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
Actually, Javascript is not required. The page DOM can be manipulated via the Common DOM API. The AppletsFaq links to an article about that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using applet to write to HTML page