Made callback optional for ajax requests

This commit is contained in:
Timothy Warren 2011-06-28 08:00:12 -04:00
parent 5055bce0fc
commit 0fca7435f7

11
kis.js
View File

@ -63,6 +63,11 @@
}, },
_do: function(url, data, callback, isPost) _do: function(url, data, callback, isPost)
{ {
if(typeof callback === "undefined")
{
callback = function(){};
}
var request = this._req(); var request = this._req();
var type = (isPost) ? "POST" : "GET"; var type = (isPost) ? "POST" : "GET";
@ -433,12 +438,6 @@
var cName = (cs.length > 1) ? cs.join(" ") : cs[0]; var cName = (cs.length > 1) ? cs.join(" ") : cs[0];
//Check if trim method exists
if(cName.trim)
{
cName = cName.trim();
}
if(typeof sel.className !== "undefined") if(typeof sel.className !== "undefined")
{ {
sel.className = cName; sel.className = cName;