Is it possible through my code to make a HTML doc appear in the user browser?
Joined: Sep 29, 2000
Well, of course the obvious answer to that is yes. You are doing that right this second (check out the Location Bar). The question is WHAT are you trying to accomplish, and from where. Normally an Applet is embedded IN an HTML page, so apparently that is not what you are aking. Any program can write out a file that has Strings in it that just happen to be HTML code. A java program can launch another program, say for instance a browser, and feed it a parameter, which just happens to be an HTML file, and that would cause the HTML doc to appear in the browser. But of course that would be a SEPARATE window and function from the java program / applet that invoked it. It is possible to point a URL at an HTML file and "invoke" it that way also.
I am not really sure from your question WHAT it is that you are trying to accomplish.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: May 21, 2001
In fact, i've an application which generate a HTML document. Iwould like this doc to be displayed after its creation.
Joined: Mar 23, 2001
I hope this partial answer will help... I do the same basic thing from an AS/400 to the users current browser. You need to execute a system command like so: "START urlpath/filename.html". From what I've been reading here at the Ranch, you can do stuff like this by executing a runTime() method, but I don't know the implementation details. If you create the file on the fly, then you know the path and name, so I would think that you would be able to build the appropriate String and send the String to the System Command. Let us know when you have it ironed out! ------------------ I'm a soldier in the NetScape Wars... Joel
Wait a minute, I'm trying to think of something clever to say...<p>Joel