Quote Code > code

Some Code

(1/1)

Crip:

--- Code: ---// Show a list of errors (if any).
var errors = XMLDoc.getElementsByTagName('smf')[0].getElementsByTagName('errors')[0];
var errorList = new Array();
for (var i = 0, numErrors = errors.getElementsByTagName('error').length; i < numErrors; i++)
errorList[errorList.length] = errors.getElementsByTagName('error')[i].firstChild.nodeValue;
document.getElementById('errors').style.display = numErrors == 0 ? 'none' : '';
document.getElementById('error_serious').style.display = errors.getAttribute('serious') == 1 ? '' : 'none';
setInnerHTML(document.getElementById('error_list'), numErrors == 0 ? '' : errorList.join('<br />'));

--- End code ---
-------------

Navigation

[0] Message Index

Go to full version