Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internet Explorer, getting into an open page
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01076936
Message ID:
01077001
Vues:
23
Judging by what you are saying, I think that either the page is being dynamically altered via browser-side DHTML operations using javascript, or the "site" you are using is actually a frameset. Either way, that makes things more complicated than traversing a frameless, static DOM. Especially with DHTML, I believe that what you see when you do a "view source" does not necessarily reflect the current contents of the DOM. It instead reflects what the browser has cached from the web server.

You might try this:
oIE = CreateObject("InternetExplorer.Application")
oie.Navigate("http://yahoo.com")  && Or wherever
oie.Visible=.t.
Work through the page as usual, and then see if you can get to document.body.innerHTML and see if it reflects the current state of the displayed document. If you know the layout of the DOM you're working with, it then becomes a lot more straightforward to traverse it sensibly and pull out the specific elements you want. You might find, for example, that the contents you want are in specific tables or DIVs that have ID attributes, so you can use getElementbyID to retrieve their specific innerHTML, etc.

>Yes, but if IE is already open, and looking at a web page, will this let me
>peak into that page? I am talking about a web site that I log on to,
>do some work on-- all the time the url remains the same, but whats on the screen
>changes, as I work there. Then I get to where I want to be. And I
>want to save the whole web page as an htm file. So I need to be able to
>attach into or plug into a web page that is already up. But I think the below
>code will simply open up a new instance of that web page, not the one
>I would have been working in.
>???
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform