getting a frame inside out

Jipakazoid

Newcomer
Joined
Feb 10, 2004
Messages
5
Hi all,
with a simple :
str = wb.Document.body.innerHTML

i can get am HTML source that is in the body, but two questions arise,

1. How do i get what is in the head part, or even better can i get the whole document, like i would if i'd use "view source" ?

2. How do i access this .innerHTML of a frame that is nested in this document of mine? Say my document is the menu that has 3 frames with names "a" "b" "c", how do i get there sources?
i tried :
str = wb.Document.frames("a").body.innerHTML
and :
str = wb.Document.frames.a.body.innerHTML
but it's a syntaxis that i donno and don't think i will guess, so i ask you for help :)

Thanks in advance, J.
 
Well if i could get rid of the frame i would of course do that, but it's not my choice. I have to work with frames, the thing is i don't see anyone tell me how :)

Or your post simply means it's impossible?
 
iframes:
Code:
alert(window.document.frames[0].document.body.innerHTML);


for normal frameset use

parent.window.document.frames[0] ...
 
this is javascript!!!

the server has no idea of you frames or something! the server gets a request and gives rendered html back to the client!

when you need this innerhtml serverside read it with javascript, write it to a asp server textbox and get the textbox.text on the serverside...

what exactly want you to do?
 
As WebJumper pointed out; it's not impossible but quite a chore and workaround. ASP.NET was not designed to use frames.

Maybe there is a way around using frames, what exactly is your given task?
 
I have to analyze pages i recieve from a certain server.
For that i have to log-in, and i get frames, i can't open one of the pages alone because there is a JavaScript check to see that i use the server frames, and if i don't it throws me by _top to the login page. Therefore i must use frames, and the target as i said is to get one of the the frame inside's info, like i would get if i would use view source in browser on that frame page.

I mean if my VB browser can show me the page, means he get's all the frames sources, so isn't there a way for him to show me what he got?
 
Back
Top