SetRequired (client-side)

Use this routine to set the required flag for the page and set a warning message to be displayed in the event that an attempt is made to save the page when one or more required fields are empty.

Definition

sub SetRequired(sWarnMsg)

Parameters

  • sWarnMsg
    A string containing a warning message phrased as "You have made incomplete changes to properties. Click 'OK' to discard the changes and exit."

Return Value

None.

Remarks

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

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

    sWarnMsg = "You have made incomplete changes to properties. " & _
               "Click 'OK' to discard the changes and exit."
    . . .
    onrequire="SetRequired(sWarnMsg)"
    
  • From within the handler of the OnRequire 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

SetDirty (client-side)

SetValid (client-side)

Server-Side Routines

Copyright © 2005 Microsoft Corporation.
All rights reserved.