• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Designers Corner

Accessing and manipulating frames and framesets is one of the most frustrating things to do using the FrontPage 2000 Object Model. The following example shows how to access a frameset and its corresponding frames programmatically.

Option Explicit

Sub AccessFrames()
Dim fset As FPHTMLFrameSetSite
Dim frame As FPHTMLFrameElement
Dim i As Integer


Set fset = ActivePageWindow.FrameWindow.Document.all.tags("frameset").Item(0)

For i = 0 To fset.Document.all.tags("frame").Length - 1
    Set frame = fset.Document.all.tags("frame").Item(i)
    If frame.src = "main.htm" Then
        frame.src = "new_main.htm"
    End If
Next i

End Sub

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint