add:  if (typeof methodParams != 'object') methodParams = []; 
context: JXTK2.JSONRPC.Proxy = function(url) {	// Public Functions	this.toString = function () {		return "[object JXTK2.JSONRPC.Proxy " + proxyurl + " ]";	};	this.call = function (methodName, methodParams, onResp) {		//alert("calling " + methodName + "(" + methodParams.join(", ") + ") via " + proxyurl);		if (onResp == true) {			// "Fork" into background			setTimeout(function() { self.call(methodName, methodParams); }, 0);			return;		}		var json = JXTK2.JSON.serialize({ method : methodName, params : methodParams });		var xmlreq;		try {			if (window.ActiveXObject) {				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");			} else {				xmlreq = new XMLHttpRequest();			}		} catch (err) {			alert('Error creating XMLHttpRequest');			return;		}		var isFunc = (typeof onResp == "function");		xmlreq.open("POST", proxyurl, isFunc);		if (isFunc) {			xmlreq.onreadystatechange = function () { handleResp(xmlreq, onResp); };		}		xmlreq.send(json);		if (!isFunc) return handleResp(xmlreq, onResp);	}	// Private Functions	function handleResp(xmlreq, onResp) {		if (xmlreq.readyState != 4) return;		if (xmlreq.status != 200) {			// TODO: better error handling			if (xmlreq.status == 404) {				alert("Transport Error: 404.\nAre you sure that SlimServer is running and your network connection is up?");			} else {				alert("Transport Error: " + xmlreq.status);			}			return;		}		var respobj;		eval('respobj=' + xmlreq.responseText);		if (respobj.error) {			alert("RPC Fault: \"" + respobj.error + "\"");		}		if (typeof onResp == "function") {			onResp(respobj);		} else {			return respobj;		}	}	// Constructor Code	var self = this;	var proxyurl = url;}
meta: 6551	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6551/8489ae0e8cc08a114bc9472eea329edd452fa2b2/core.js/clean/HTML/ExBrowse3/html/jxtk2/core.js