How to set source to a IWebBrowser without creating a temporary file?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set source to a IWebBrowser without creating a temporary file?

Howard Oh
Checked all methods of it and IWebBrowser2. Couldn't find it.

I'm looking for a method that can do like,

web source: '<HTML><HEAD>...

Thanks ahead.


Reply | Threaded
Open this post in threaded view
|

Re: How to set source to a IWebBrowser without creating a temporary file?

Chris Uppal-3
Howard,

> I'm looking for a method that can do like,
>
> web source: '<HTML><HEAD>...

I don't know if it'll help, but this is slightly adapted from one of Blair's
posts:

   presenter := URLPresenter show.
    browser := presenter view controlDispatch.
     "We must wait until the browser has loaded the blank document..."
    [browser readyState == READYSTATE_COMPLETE]
        whileFalse: [SessionManager inputState pumpMessages].
     "... and then we can stuff in the HTML"
    browser document body innerHTML: '<P>hello <b>there</b>'

READYSTATE_COMPLETE is defined in the SHDocVwConstants pool.  "browser" in the
above is an instance of IWebBrowser2.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: How to set source to a IWebBrowser without creating a temporary file?

Howard Oh
Wow, that's great! Thanks!