onInactiveAttributeMessage()

onInactiveAttributeMessage()

This function is called when an attribute is in the configuration but is inactive and a validator error message is about to be generated; this function can be used to ignore inactive attributes and/or to change or display additional messages when certain inactive attributes are used. The following variables are defined when this function is called and may be modified before the validator message is displayed: (New v15.00)

$oiam_attname - the name of the inactive attribute

$oiam_msgtext - the message text of the validator message that will be generated

$oiam_msgtextappend - an additional message that is appended to the end of $oiam_msgtext

$oiam_msgtextprepend - an additional message that is prepended to the front of $oiam_msgtext; the default is an empty string

$oiam_msgcat - the message category of the validator message that will be generated; the default is "" for no category

$oiam_msgflags - the message flags value used when calling MessageEx() to generate the message; set to 0 to cancel the message

$oiam_msgid - the message ID of the validator message that will be generated; the default is -1 for no message ID

$oiam_msgtype - the message type of the validator message that will be generated; the default is $MSG_ERROR

Example

function onInactiveAttributeMessage() {
 if $oiam_attname=="allowTransparency" {
  if CurrentTagName=="iframe" {
   $oiam_msgflags=257;
   $oiam_msgtype=MSG_WARNING;
   $oiam_msgid=2014091102;
   $oiam_msgtextappend='';
   $oiam_msgtext='The "'+CurrentAttName+'" attribute is an obsolete IE-specific attribute (that was removed in IE9) and was never a recognized part of any web standard. Transparency is now allowed by default on all commonly used browsers (except in versions of IE prior to 9). It is recommended that this attribute be removed.';
  }
 }
}