This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serialize(form) { | |
var parts = [], | |
field = null, | |
i, | |
len, | |
j, | |
optLen, | |
option, | |
optValue; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getElementsByClassName(node, className) { | |
if (node.getElementsByClassName) { | |
return node.getElementsByClassName(className); | |
} else { | |
var results = []; | |
var elems = node.getElementsByTagName("*"); | |
for (var i = 0, len = elems.length; i < len; i++) { | |
if (elems[i].className.indexOf(className) != -1) { | |
results.push(elem[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof Object.create !== 'function') { | |
Object.create = function(o) { | |
function F() {}; | |
f.prototype = o; | |
return new F(); | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl> | |
<dt>Would you like to learn more?</dt> | |
<dd>Yada Yada Such and Such</dd> | |
<dt>Would you like to learn more?</dt> | |
<dd>Yada Yada Such and Such</dd> | |
<dt>Would you like to learn more?</dt> | |
<dd>Yada Yada Such and Such</dd> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ajaxUtility = { | |
createXHR: function () { | |
if (typeof XMLHttpRequest !== "undefined") { | |
return new XMLHttpRequest(); | |
} else { | |
var versions = ["MSXML2.XmlHTTP.6.0", "MSXML2.XmlHTTP.3.0"]; | |
for (var i = 0; i < versions.length; i++) { | |
try { | |
var xhr = new ActiveXObject(versions[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventUtility = { | |
addEvent: (function () { | |
if (typeof addEventListener !== "undefined") { | |
return function (obj, evt, fn) { | |
obj.addEventListener(evt, fn, false); | |
}; | |
} else { | |
return function (obj, evt, fn) { | |
obj.attachEvent("on" + evt, fn); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isHostMethod(object, property) { | |
var t = typeof object[property]; | |
return t=='function' || | |
(!!(t=='object' && object[property])) || | |
t=='unknown'; | |
} |
NewerOlder