Click to See Complete Forum and Search --> : Is there any way to retrieve frame information from the parent page


praveen_k034
February 27th, 2006, 12:19 PM
Hello,

I have a web application and want to get the HTML code from a page in this app. But, the code generated from "File->Edit with Notepad" is different from the one that is generated by right click on any part of the page and selecting view source. With the former containing HTML frame declarations and the latter containing Java Script.

I am using the HTMLDocumentClass object to retrieve the innerText and innerHTML values. the innerHTML property shows the below content which is not required.

Code from "File->Edit with Notepad".
------------------------------------
<HTML>
<HEAD>
<TITLE>SURF Web Reports</TITLE>
</HEAD>
<FRAMESET rows="54,86%" frameborder="NO" border="0" framespacing="0">
<FRAME name="frameTop" src="banner.htm" scrolling="no" frameborder="no">
<FRAMESET rows="100%,*" border="0" frameSpacing="0" frameBorder="0">
<FRAME name="frameContainer" id="frameContainer" src="Main.htm" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET>
</FRAMESET>
</HTML>
From the code we see that there are many frames ,these frames contain sub-frames.
Is there any way to retrieve frame information (Javascript) from the parent page.

wildfrog
March 1st, 2006, 07:37 PM
Hmm, I'm not exactly sure what you're asking for here, but the window object contains some properties called self, parent and top.

You can use them to access this frame, the parent frame and the topmost frame.

- petter