How can I display raw HTML, generated by an applet, without saving it on the server?
Location: http://www.jguru.com/faq/view.jsp?EID=34869 Created: Apr 11, 2000 Modified: 2000-12-20 19:23:26.454 Author: Andre van Dalen (http://www.jguru.com/guru/viewbio.jsp?EID=7570) Question originally posed by John Zukowski PREMIUM (http://www.jguru.com/guru/viewbio.jsp?EID=7 You can display HTML dynamically generated by your applet by passing it first to a JavaScript method, (see also this FAQ) that in turn puts the code into the page. You can overwrite a document frame or change the innerHTML of a section with the HTML you get passed from the applet. The following files give a working example for IE4, making it work on netscape is left as an exercise to the reader 😉 == mkhtml.java import java.applet.*; import netscape.javascript.*; public class mkhtml extends Applet { public void start() { try { JSObject javaScript = JSObject.getWindow(this); if (null != javaScript) { String param = getParameter(“text”); Object[] args = new Object[1]; for (int n = 1; n = param.length(); n++) { Th