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

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.

See Also

Client-Side Routines

SetRequired (client-side)

SetValid (client-side)

Server-Side Routines


All rights reserved.