SBM JavaScript Library Guide → Advanced Functions → ShowErrorDiv Method
Displays an error message at the top of a page.
Name | Type | Description |
---|---|---|
show | Boolean | Whether to display the message. |
message | String | The message to display. |
Result | Value |
---|---|
(none) |
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 );
(none)
Copyright © 2007–2015 Serena Software, Inc. All rights reserved.