onEndTag_(tagname)()

onEndTag_(tagname)()

Replace (tagname) with the actual tag name. When an end tag with that tagname is encountered, this function is executed after any other end tag programs assigned to the element. For example, use the function name onEndTag_textarea if you want the function to execute when a "textarea" end tag is encountered. (New v10.9912)

NOTE: Although most function names are case-sensitive, the (tagname) part of this function name is case-insensitive.

Example (check that certain meta tags were used):

The default configuration file sets variable names based on which meta tags are used. These variables can be used to check to see if there are any missing meta tags in a head section.

function onEndTag_head() {
 $metaname="dcterms.title"; checkMetaDataExists();
 $metaname="dcterms.subject"; checkMetaDataExists();
 $metaname="dcterms.language"; checkMetaDataExists();
}
 
// checks to make sure there's meta data for $metaname
function checkMetaDataExists() {
 $varname="meta"+toLower($metaname)+"used";
 if !isDefined($varname) { Message(1,MSG_ERROR,'Missing a "'+$metaname+'" meta tag.'); }
}