PDA

Click to See Complete Forum and Search --> : Sending HTML to a browser ?? Help !


Paul282
Mar 23rd, 2000, 12:50 PM
Is it possible to dynamically create an HTML document in a string type and then pass it to a web browser control?

I can't see a way of doing it without saving the string as a file then pointing the webbrowser control to the file !!!

For example, if you have a text editor in which you are writing HTML code and you want to view it in a web browser which is sitting on a different tab (like frontpage) how can you send the HTML source to the browser?? I can only see how to pass it a URL or file... :(

FirePoweR
Mar 26th, 2000, 08:21 AM
You could tell it to navigate to "about:<html>The Source</html>"

like this:
Text1 is the source code
WebBrowser1.Navigate "about:" & Text1.Text

weikiat
Feb 20th, 2003, 08:39 AM
I used that method 3 years ago and it gave me lots of problem. Source code dover 2056 letters don't work if you use this method. Try writing a file into the same directory as your app then use the webbrowser to navigate there. at document complete, delete the temp file using kill(filename)

JoshT
Feb 20th, 2003, 10:42 AM
You could open it to a template HTML file, then use the MSHTML InnerHTML or InnerText functions to dynamically change the browser's source.