X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=ajax%2Fajax.js;h=87a90b348a570832503d4f50729c0b76c344f3e3;hb=6e69be66878c6fe384cbf42345337d19554ffbb6;hp=f5eab6c28d1102460a8dbbd863e6f78b911b10ff;hpb=330867ac2fa9c54d9f1869931e5bd87a6c0c872b;p=jquery.git diff --git a/ajax/ajax.js b/ajax/ajax.js index f5eab6c..87a90b3 100644 --- a/ajax/ajax.js +++ b/ajax/ajax.js @@ -115,7 +115,7 @@ $.fn.load = function(a,o,f) { f = o; o = null; } - if (o !== null) { + if (typeof o !== 'undefined') { o = $.param(o); t = "POST"; } @@ -124,7 +124,7 @@ $.fn.load = function(a,o,f) { h = h.responseText; self.html(h).find("script").each(function(){ try { - $.eval( this.text || this.textContent || this.innerHTML ); + $.eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){} }); if(f){f(h);} @@ -215,7 +215,7 @@ $.fn.update = function(sURL, sMethod, aValues, fCallback) { // Evaluate the scripts AFTER this (so you can allready modify the new HTML!) el.html(sResult).find("script").each(function(){ - try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e) { } + try { $.eval( this.text || this.textContent || this.innerHTML || "" ); } catch(e) { } }); // And call the callback handler :)