Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IE object model
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00325938
Message ID:
00325945
Views:
22
John,

Here's a chunk of code I'm using to work with all links of a frame:
loDoc = thisform.oBrowser.Document.Frames(3).Document

n = 0

for i = 0 to loDoc.Links.Length - 1
   lcLink = loDoc.Links(i).HREF
   if ( "xworks.exe?2,15," $ lcLink )
      n = n + 1
      dimension lalinks[n]
      laLinks[n] = lcLink
   endif
endfor
This is operating only on a subset of the links in loDoc but you should be able to iterate through all frames and iterate all links/frame. I use the stored HREF value to either set URL or call the Navigate() method.

>Has anyone been able to put a program together that will surf the object model of a multi framed web page and iterate all the links, buttons,forms, etc. I have had some success copying an html page down to my local drive and opening it with VI, then looking at the objects, but my attempts to programmatically surf the object model aren't working that well.
>
>I know that I can do the following using the browser control to get the links in a simple page, but would like to be able to pull all the objects from a page.
>
>For Each link In thisform.olecontrol1.document.links
>	if thisform.whatlinks='Innertext'
>	 m.links=allt(link.innertext)
>	 else
>	 m.links=allt(link.outertext)
>	endif
>	m.linkstring=allt(link.toString)
>	insert into weblinks from memvar
>Next link
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform