Messages To the User

Response messages to the user should be wrapped in a div or p tag with one of the following three class names assigned.

Success Message

Use a success message to tell the user that her action has been fulfilled.

<div class="success"Your data has been saved.</div>

Rendered result:

Your data has been saved.

Alert Message

An alert message informs the user that something must be corrected.

<div class="alert">Please correct the information below.</div>

Rendered result:

Please correct the information below.

Error Message

Error messages must only be used when the system itself or some of its sub systems failed, not when the user makes a mistake.

<div class="error">This is an error message telling that the application has failed.</div>

Rendered result:

This is an error message telling that the application has failed.

Senast ändrad: 2011-03-06 11:59