Re: Using webbrowser ctl to save the generated/partial source html page(rendered in javascript)



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,'&amp;');s=s.replace(/>/
g,'&gt;');s=s.replace(/</g,'&lt;');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????


.



Relevant Pages

  • Re: can I know how to write a html parser in C
    ... Are the lines truly limited to 80 characters of text? ... null-terminated character string size of 249 characters. ... Note too that in the general case it is perfectly acceptable in HTML ... much a beginner at C (and possibly a beginner at programming ...
    (comp.lang.c)
  • Re: Subject text length limit in system.net.mail?
    ... Finally figured what it was - Internet Message Filter for Exchange settings ... decided to change the mail server? ... to pre-generated html pages published somewhere. ... AM> stuff for invalid characters that might cause the process to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [PHP] generating an html intro text ...
    ... You would have to search out and pull in all closing tags. ... grab 256 characters -- The string. ... html markup should not go towards the string length count, ...
    (php.general)
  • Question about CGI.pm
    ... I have been exploring CGI.pm and am of course interested in the HTML ... Escape HTML formatting characters in a string. ... the standard HTML escaping rules will be used. ... is passed through a function called escapeHTML(): ...
    (perl.beginners)
  • Re: Input Character Set Handling
    ... two 8-bit encoded characters matching 208 and 144. ... You wrote that you deal with say Japanese and Korean 'legacy' encodings ... neither for Russian in UTF-8 nor for Japanese ... I don't know why you did not know before about say .HTML files ...
    (comp.lang.javascript)