News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1181271521:v:use_geshi-1:v:type-javascript

Started by SleePy, Jun 08, 2007, 02:58 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SleePy

// Define document.getElementById for Internet Explorer 4.
if (typeof(document.getElementById) == "undefined")
   document.getElementById = function (id)
   {
      // Just return the corresponding index of all.
      return document.all[id];
   }
// Define XMLHttpRequest for IE 5 and above. (don't bother for IE 4 :/.... works in Opera 7.6 and Safari 1.2!)
else if (!window.XMLHttpRequest && window.ActiveXObject)
   window.XMLHttpRequest = function ()
   {
      return new ActiveXObject(is_ie5 ? "Microsoft.XMLHTTP" : "MSXML2.XMLHTTP");
   };
No siggy! :D