Jipakazoid Posted February 10, 2004 Posted February 10, 2004 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. Quote
Moderators Robby Posted February 10, 2004 Moderators Posted February 10, 2004 The best way is to get rid of the frames, seriously though can you not do without frames. Quote Visit...Bassic Software
Jipakazoid Posted February 11, 2004 Author Posted February 11, 2004 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? Quote
WebJumper Posted February 11, 2004 Posted February 11, 2004 iframes: alert(window.document.frames[0].document.body.innerHTML); for normal frameset use parent.window.document.frames[0] ... Quote
Jipakazoid Posted February 11, 2004 Author Posted February 11, 2004 WebJumper, THAT is going to work for VB.NET ??? Quote
WebJumper Posted February 11, 2004 Posted February 11, 2004 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? Quote
Moderators Robby Posted February 11, 2004 Moderators Posted February 11, 2004 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? Quote Visit...Bassic Software
Jipakazoid Posted February 11, 2004 Author Posted February 11, 2004 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? Quote
*Gurus* Derek Stone Posted February 11, 2004 *Gurus* Posted February 11, 2004 Not without using JavaScript. Quote Posting Guidelines
Jipakazoid Posted February 11, 2004 Author Posted February 11, 2004 And how with javascript? The thing is i don't control the server. I just want to analyze it's texts.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.