Commit 50cdc997 authored by Gilles van den Hoven's avatar Gilles van den Hoven

removed $.fn.changer by Marc's request and changed back the responseText in $.xml

parent 66565227
...@@ -120,18 +120,15 @@ $.fn.load = function(a,o,f) { ...@@ -120,18 +120,15 @@ $.fn.load = function(a,o,f) {
t = "POST"; t = "POST";
} }
var self = this; var self = this;
$.xml(t,a,o,function(h){ $.xml(t,a,o,function(res){
// Get HTTP data
h = $.httpData(h);
// Assign it and execute all scripts // Assign it and execute all scripts
self.html(h).find("script").each(function(){ self.html(res.responseText).find("script").each(function(){
try { $.execute( this.text || this.textContent || this.innerHTML || ""); } catch(e){} try { $.execute( this.text || this.textContent || this.innerHTML || ""); } catch(e){}
}); });
// Callback function // Callback function
if (f && f.constructor == Function) if (f && f.constructor == Function)
f(h); f(res.responseText);
}); });
return this; return this;
}; };
...@@ -324,17 +321,3 @@ $.fn.putForm = function(target, pre_cb, post_cb, url, mth) { ...@@ -324,17 +321,3 @@ $.fn.putForm = function(target, pre_cb, post_cb, url, mth) {
return this; return this;
} }
// ------------------------------------------------------
$.fn.changer = function(form, target, pre_cb, post_cb) {
$(form).submit(function(e) {
e.preventDefault();
return false;
});
this.change(function(e) {
e.preventDefault();
$(form).getForm().putForm(target, pre_cb, post_cb);
return this;
});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment