Commit 3a11a5f6 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Added javascript displayMessages function

parent 091c4de4
function displayMessage(m) {
var color = 'red';
if (m.type == 'ok') {
color = 'green';
}
else if (m.type == 'info') {
color = '#aa6;';
}
var elemid = 'messages';
if (arguments.length > 1 && typeof(arguments[1]) == 'string') {
elemid = arguments[1];
}
$(elemid).appendChild(DIV({'style':'color:'+color+';'},m.message));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment