• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applet to HTML

Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Carl for response.
I have an applet. Which writes data to server and can get back data from server. Now In my applet, I want to write data what I got from server to particular field of HTML(for example: cell of table in HTML).
How to write data to particular cell from Applet?
Please let me know,
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can directly write HTML from an applet.
I haven't tried this, but you might be able to get data from an applet with script (eg JavaScript) in your HTML page. I know you can call applet methods from script, but I don't know if you can read the return values.
e.g. you could have
<Applet name="a1" ...>
<input name="box1">
<script language=JavaScript>
box1.value = a1.doMethod();
NOTE: I haven't done HTML for a bit, there might be syntax errors here
If you can get the return value, you could put it in a form element in your HTML (as above).
Or, you might be able to write the HTML from the script, like:
document.write( a1.getData() );
or something similar.
You might find it easier to use JSP / ASP or something similar, where the HTML is created on the server before being sent to the browser, to do what you want.
Hope that helps.
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dont know if this reply is too late, but anyways here is what you can do.
You could use a JSObject class and populate data in the HTML from an applet. For this u have to have the class files on client side as well.
JSObject can be found under the package "netscape.javascript.*".
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic