ShowErrorDiv Method

Displays an error message at the top of a page.

Parameters

Name Type Description
show Boolean Whether to display the message.
message String The message to display.

Return Value

Result Value
(none)  

Example

This example displays an error message if the Description field is not filled in before a page is submitted:

function customSubmitCallback()
{
    // Prevent submit if Description field is empty
    if ( IsFieldEmpty( "Description" ) )
    {
         ShowErrorDiv( true, "A description is required" );
         return false;
    }
    else
    {
         ShowErrorDiv( false );
         return true;
    }
}

AddSubmitCallback( customSubmitCallback );

Comments

(none)