- return s.join("&");
-};
-
-$.fn.load = function(a,o,f) {
- // Arrrrghhhhhhhh!!
- // I overwrote the event plugin's .load
- // this won't happen again, I hope -John
- if ( a && a.constructor == Function ) {
- return this.bind("load", a);
- }
-
- var t = "GET";
- if ( o && o.constructor == Function ) {
- f = o;
- o = null;
- }
- if (o !== null) {
- o = $.param(o);
- t = "POST";
- }
- var self = this;
- $.xml(t,a,o,function(h){
- h = h.responseText;
- self.html(h).find("script").each(function(){
- try {
- $.eval( this.text || this.textContent || this.innerHTML );
- } catch(e){}
- });
- if(f){f(h);}
- });
- return this;
-};
-
-/**
- * name: $.fn.formValues
- * example: $('#frmLogin').formValues('sButton')
- * docs: Gets form values and creates a key=>value array of the found values.
- * Optionally adds the button which is clicked if you provide it.
- * Only does this for ENABLED elements in the order of the form.
- */
-$.fn.formValues = function(sButton) {
- var a = [];
- var elp = {INPUT:true, TEXTAREA:true, OPTION:true};
-
- // Loop the shite
- $('*', this).each(function() {
- // Skip disabled elements
- if (this.disabled)
- return;
-
- // Skip elements not of the types in elp
- if (!elp[this.tagName.toUpperCase()])
- return;
-
- // Skip submit buttons and image elements
- if ((this.type == 'submit') || (this.type == 'image'))
- return;
-
-
- // Skip non-selected options
- var sP = this.parentNode.nodeName.toUpperCase();
- if (((sP == 'SELECT') || (sP == 'OPTGROUP')) && (!this.selected))
- return;
-
- // Skip non-checked nodes
- if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked))
- return;
-
- // If we come here, everything is fine
- var sN = this.name || this.id || this.parentNode.name || this.parentNode.id;
- var sV = this.value;
- if ((!sN) && (sP == 'OPTGROUP'))
- sN = this.parentNode.parentNode.name || this.parentNode.parentNode.id;
-
- // Add the data
- a.push({ name: sN, value: sV });
- });
-
- // Add submit button if needed
- if (sButton && (sButton !== null)) {
- var el = $(sButton).get(0);
- a.push({
- name: el.name || el.id || el.parentNode.name || el.parentNode.id,
- value: el.value
- });
- }
-
- // Done
- return a;
-};
-
-/**
- * name: $.fn.update
- * example: $('someJQueryObject').update('sURL', 'sAction', 'aValues', 'fCallback');
- * docs: Calls sURL with sAction and sends the aValues
- * Puts the results from that call in the jQuery object and calls fCallback
- */
-$.fn.update = function(sURL, sMethod, aValues, fCallback) {
- var el = this;