File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 18127
    
    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
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Actually, Javascript is not required. The page DOM can be manipulated via the Common DOM API. The AppletsFaq links to an article about that.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using applet to write to HTML page
 
Similar Threads
Applets-----To------HTML page .....How?
html+applet+servlet=how to do
AccessControlException Problem
applets reading from text file on client machine?
Why comment in applet java program