Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How get the code source (with dhtml, javascript) from a web page?

Status
Not open for further replies.

tarvel

Technical User
Nov 21, 2005
8
FR
Hello,
I try to get the code source (with dhtml, javascript) from a Web Page like https... to get back the tables of my account but I have only a frame (the first frame of the page)... I have this macro vba: (which works well with the other pages)
IE.navigate "Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
nFile = FreeFile
Open "C:\Compte.htm" For Output Shared As #nFile
Print #nFile, IE.document.documentElement.innerHTML
Close #nFile

Have you a means there to get back vba the code source of the complete page and not only the first frame (or layer?)?
Thank you for your help
 
I have look...some information are interesting..but it's on JS...I look for a vba example!!!
 
The DOM is the same despite you use it with JS, VBS, VBA, C++, ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
But how i can use in my macro vba..I don't understand??
var frm = document.frames;
for (i=0; i < frm.length; i++)
alert(frm(i).location);
or
var frm = window.parent.frames;
for (i=0; i < frm.length; i++)
alert(frm(i).name);
 
Perhaps this ?
Dim frm As Object, i As Integer
Set frm = IE.document.frames
For i = 0 To frm.length - 1
MsgBox frm(i).location
Next

Or this ?
Dim frm As Object
For Each frm in IE.document.frames
MsgBox frm.location
Next

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The first soluce seems work fine!!!
Thanks much PHV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top