How to get IFrame page source in subdomain in IE addon

I am doing IE Addon using BandObjects in C #. I am making my web browser to go to a page, say example.com. This page has an IFrame whose src is sub.example.com. So IFrame points to a subdomain. I can get the IFrame URL, but could not get the source of the page when I view it in the browser there, but through the code I can only view the script, no data. I insert an IFrame:

<iframe height="40" src="http://sub.example.com/....php?style=web&amp;ext=1305964161&amp;hash=Ng1gwLG821-f" frameBorder="0" width="300" scrolling="no"></iframe> 

When I look at this element through the visual studio, in the HTML view, it shows me the data that shows this email and text view. How to get HTML representation or indicate the source of the page if this iframe. So overall, I want the data contained in this IFrame, the browser executes it somehow, but how can I do this with the code? I visited many sites, forums, but could not get it to work. I would be grateful for any help, it is urgent.

Hello

+4
source share
1 answer

Well, in a browser that is active, the code is the code, there is no way to view the frame source in the active window, unless, of course, the frame is large enough to right-click and view the source code of itself. Otherwise, you are stuck with what is displayed in the browser as your source, and iframe per say is not relevant to the conversation. However, seeing that adding your application allows you to load the iframe URL into a hidden sort window, and then get the code in the same way as for the active page? Can you use javascript anywhere in your addon? I know this is a stupid question, but I never created a browser add-on.

if you can use javascript, perhaps something like getting the name iframe / id / any to identify it and then using innerHTML in an element that you could catch the source.

0
source

All Articles