Results 1 to 4 of 4

Thread: Sending HTML to a browser ?? Help !

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    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...


  2. #2
    Member FirePoweR's Avatar
    Join Date
    Apr 1999
    Posts
    32
    You could tell it to navigate to "about:<html>The Source</html>"

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

  3. #3
    Addicted Member
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    143

    Your method sux

    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)
    Unignal Software Team Developer
    -------------------------------------------
    Current Project:
    Noter Light
    -------------------------------------------
    http://www.unignal.sg.tf

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You could open it to a template HTML file, then use the MSHTML InnerHTML or InnerText functions to dynamically change the browser's source.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width