I tried to override the Error function on theme base to add a closing button but it seems that the error message HTML is generated with Javascript through this function :
qa_ajax_post('vote', {postid:postid, vote:vote, code:code},
function(lines) {
if (lines[0]=='1') {
qa_set_inner_html(document.getElementById('voting_'+postid), 'voting', lines.slice(1).join("\n"));
} else if (lines[0]=='0') {
var mess=document.getElementById('errorbox');
if (!mess) {
var mess=document.createElement('div');
mess.id='errorbox';
mess.className='qa-error';
mess.innerHTML=lines[1];
mess.style.display='none';
}
var postelem=document.getElementById(anchor);
var e=postelem.parentNode.insertBefore(mess, postelem);
qa_reveal(e);
} else
qa_ajax_error();
}
);
I am new to JS, any help please to add HTML Button and making works through JS.
thank you !