Saturday, September 28, 2013

Getting HTML-code from a source using javascript part 2

Hi,


Unfortunately my previous question on this matter seems to be closed because I had an unexpected holiday. To try again:


I have a webbrowser control in my application, with the browser I navigate to certain pages containing javascript. On one of these pages there is an outerpage and an innerpage (not sure how this is called). The innerpage contains results I want to analyse and save. For this I need the HTML-text. Pointing the mouse to the innerpage and right-clicking the mouse gives me a dialog with, among others, the possibility to view the source code; that is exactly what I need. But how can I get this (just like the browser produces the HTML-text) in a string for analysing?


I tried using the DOM etc. but I can't get to the innerpage. If the webbrowser control can produce what I need there must be a simple way to do the same and fetch the HTML-text programmatically (somewhere the text written to screen should be captured).


Anyone any ideas for this seemingly easy operation?


No comments:

Post a Comment