IsDirty Property Example

This example checks if the active page has changed; if it has, the program executes the Save method for the active page.

Private Sub DirtyDocument()
Dim myPage As PageWindow
Dim myDoc As FPHTMLDocument
Dim mySaveCheck As Boolean

Set myDoc = WebWindows(0).PageWindows(0).Document

Call myDoc.body.insertAdjacentHTML("BeforeEnd", _
    "<b> modified </b>")
If ActivePageWindow.IsDirty = True Then
    ActivePageWindow.Save
End If
End Sub