Theme Selector





Welcome, Guest. Please login or register.

December 03, 2024, 12:26:12 PM

Login with username, password and session length

Recent

Members
  • Total Members: 5
  • Latest: Tester
Stats
  • Total Posts: 18
  • Total Topics: 12
  • Online today: 7
  • Online ever: 24
  • (December 17, 2010, 03:04:49 PM)
Users Online
Users: 0
Guests: 39
Total: 39

39 Guests, 0 Users

Author Topic: Some Code  (Read 31074 times)

Offline Crip

  • Administrator
  • Newbie
  • *****
  • Posts: 8
Some Code
« on: August 07, 2013, 09:47:48 AM »
Code: [Select]
// 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 />'));
-------------
Signature here..