Link to home
Start Free TrialLog in
Avatar of mikekwok
mikekwokFlag for Hong Kong

asked on

Showing the DOM strucuture of a homepage

I would like to ask if there is any method to see the whole DOM structure of a homepage on the internet ?
As I want to access some elements in the DOM structure of the hompage . but it is so trouble that there are so many frames in the homepage . It is too difficult for me to access locate the element .

Avatar of jaysolomon
jaysolomon

If it is that difficult to find the elements then maybe that shold clue you in, rethink your design.

>>so many frames<<

That spells T R O U B L E
Avatar of mikekwok

ASKER

The homepage is not designed by me . It is host by others and I cannot redesign it.
Do you know how to slove it ?
Hi Mike,

   You cannot access another domain's DOM; you will get an 'access denied' message.  The best you can do is download the site & look for the element manually.  

  What is it you are trying to do?  Perhaps there is another way.

Vinny
I am working on Internet Explorer Object Automation using Visual Basic.
I want to write a visual basic program that can login to a homepage and then can input some text in some textfields automatically. However, the homepage is not designed or hosted by me. the homepage designer always embed frames inside frames. Do u have any solution for me so that i can view on the whole Dom strucutre of the homepage ?
ASKER CERTIFIED SOLUTION
Avatar of Zontar
Zontar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richie_Simonetti
didn't you receive the document "Accessing the Internet Explorer Document Object Model from Visual Basic 5.0" (Accessing the Internet Explorer Document Object Model from Visual Basic 5_0 , MIND August 1998.htm)  in the zip that i sent to you?
After I login to a homepage, it pop up a dialog : "Secure Information. This Page contains both secure and non-secure items. Do you want to display the non-secure items ?"
my current approach to solve this problem is to use AppActivate "Security Information" and then press enter using the keysboard event.

Would somebody tell me how can i know when the secure information dialog s pop up and then i do something after pop u p?
If there are 2 frames in a homepage, how can it detect if the content of 1 of the frames finish loading in Visual Basic ?
What exactly are you trying to accomplish? Might you better off writing an app that just uses HTTP request/response directly?
I know how to solve the problem .
Do until IE.busy = false
   doevents
loop


However, I don't know how can i set an IE object reference to the Internet Explorer which is opened by another Internet Explorer ?

My situation is that after clicking a button in Internet Explorer, it popup some IE . i need to locate all those IE and click something in the IE.
would somebody please help me ?
You can detect when all frames are downloaded at documentcomplete event of ie/webbrowser control, just use this:

' for IE
If (pdisp is ie) then
end if

' for webbrowser control
if (pdisp is webbrowser1.object) then
end if

Documentcomplete event is fired for every frame but pDisp is ie or pDisp is wb1.object is TRUE ONLY when ALL frames are downloaded.
:((
All my work was vain!