Name
message
Synopsis
This action directs a message to the user, with various possible
levels of intrusiveness, based on the required attribute
level. In scripting,
this effect is commonly implemented with the
alert( ) function, which
is the most intrusive technique, since it is modal, and prevents any
further action until the user dismisses the message. XForms enables
friendlier (and less visual-centric) messages:
modeless, which doesn’t
interfere with the rest of the form, but sticks around until
dismissed; and ephemeral, a fleeting,
goes-away-by-itself message, such as a tool tip or brief status bar
message.
Figure 7-2 shows visual representations of various messages.

Figure 7-2. XForms Action: message
The general concept of various levels of intrusiveness applies well to non-visual designs, too; for example, the difference between an insistent voice prompt that requires acknowledgement versus a one-time message.
Typically, the content of the message element is
the message to be rendered. Like other XForms elements, the content
can also come from the instance data (from binding attributes) or
from an external file (from linking attributes). Only a single source
is ever used; the order of preference is: binding attributes, linking
attributes, inline text, as shown next.
<message level="ephemeral" ev:event="DOMFocusIn">Produced by PBP</message> <message level="modeless" model="messages" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access