Share via


SetDirty (client-side)

Use this routine to set the dirty flag for the page and set a confirmation message to be displayed in the event that the page is closed without having been saved.

Definition

sub SetDirty(sConfirmMsg)

Parameters

  • sConfirmMsg
    A string containing a confirmation message phrased as "Save XXX before exiting?" For example, "Save product description before exiting?"

Return Value

None.

Remarks

There are three common ways in which this routine can be called:

  • Directly from script code on the page when the page logic determines that something must be saved before the page is closed.

  • As the handler of the OnChange event of the master EditSheet for the page (set as an attribute of the container element of the EditSheet HTC):

    onchange='SetDirty("Save product description before exiting?")'
    
  • From within the handler of the OnChange event of the master EditSheet for the page.

This routine is only available after the taskbar has been inserted by calling either InsertTaskBar or InsertEditTaskBar.

This routine is available in the include file ActionPageUtil.asp.

To minimize the size of action page downloads, this routine is a wrapper function that calls a function with the same name in the file bizdesk.asp. The version in bizdesk.asp takes an additional parameter (oWindow) as its first parameter, and is called using the "parent." notation.

See Also

Client-Side Routines

SetRequired (client-side)

SetValid (client-side)

Server-Side Routines

Copyright © 2005 Microsoft Corporation.
All rights reserved.