professional-sql-10-public-files-js-ajax.js / js
/* retrieve all elements of a given class */ function getElementsByClass(search) { var classElements = new Array(); var els = document.getElementsByTagName('*'); var pattern = new RegExp('(^|\\s)' + search + '(\\s|/* create an XML HTTP Request object for "ajax" calls */ function createXMLHTTPObject() { if (typeof XMLHttpRequest != 'undefined') { return new XMLHttpRequest(); } else if (window.ActiveXObject) { var vers = [ 'Microsoft.XmlHttp', 'MSXML2.XmlHttp', 'MSXML2.XmlHttp.3.0', 'MSXML2.XmlHttp.4.0', 'MSXML2.XmlHttp.5.0' ]; for (var i = vers.length - 1; i >= 0; i--) { try { httpObj = new ActiveXObject(vers[i]); return httpObj; } catch(e) {} } } throw new Error('XMLHTTP not supported'); }
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.