Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- From: learnyourabc <learnyourabc@xxxxxxxxx>
- Date: 29 Apr 2007 00:08:36 -0700
Shouldn,t document.documentElement.outerHTML give me the
<HTML>.......</HTML>
but using the web browser ctrl
pElem is the documentelement
pElem ->get_tagName(&bstrTagname); // bstrTagname is HTML
pElem->get_outerHTML(&bstrTemp);
//But bstrTemp is only 60 characters long(the actual html is much
longer) and is <HTML>............<script src=....> why does it not end
with </HTML>??
Can anyone provide some explanation on what is going on here??
On Apr 29, 8:59 am, learnyourabc <learnyour...@xxxxxxxxx> wrote:
Running the following java script in a bookmarklet will display the
source html on another page in the IE.
<A class=bml href="javascript:(function(){ function htmlEscape(s)
{s=s.replace(/&/g,'&');s=s.replace(/>/
g,'>');s=s.replace(/</g,'<');return s;} x=window.open();
x.document.write('<pre>' + htmlEscape('<html>\n' +
document.documentElement.innerHTML + '\n</html>'));
x.document.close(); })();" name=generated_source>generated source</A>
tried getting the document.documentElement.innerHTML using the below
code.
I did the following but does not work javascript is not
interpreted.....
hr = document_dispatch->QueryInterface(IID_IHTMLDocument3,(void
**)&document);
hr = document->get_documentElement(&pElem);
if (hr == S_OK && pElem != NULL)
{
pElem->get_innerHTML(&bstrTemp); //<-----but bstrTemp
contains <HEAD></HEAD><BODY>........<script type="text/
JavaScript"
//
src="http://joongangdaily.joins.com/_ui/script/top.js"></
script>........</BODY>
pElem->Release();}
What do I have to do to get the final html????
.
- Follow-Ups:
- References:
- Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- From: learnyourabc
- Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- From: learnyourabc
- Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- From: learnyourabc
- Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- Prev by Date: Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- Next by Date: Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- Previous by thread: Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- Next by thread: Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)
- Index(es):
Relevant Pages
|
|