Theme Selector





Welcome, Guest. Please login or register.

February 29, 2024, 12:16:27 AM

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: 6
Total: 6

6 Guests, 0 Users

Author Topic: Some Code  (Read 26740 times)

0 Members and 1 Guest are viewing this topic.

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..