// // Common ECMA Script // function _xhrLoad(response, ioArgs) { var ans = eval("(" + response + ")"); for (i in ans) { if (i.substr(0,2) == 'v_') { dojo.byId(i).value= ans[i]; } else if (i.substr(0,2) != 'e_') { dojo.byId(i).innerHTML= ans[i]; } } for (i in ans) if (i.substr(0,2) == 'e_') xhr_exec(i, ans[i]); } function _xhrError(response, ioArgs) { alert("ajax error status:" + ioArgs.xhr.status); } function _xhr() { cnf = { url:"./xhr.php", load:_xhrLoad, error:_xhrError, form:"_xhrForm", timeout:60000, headers:{ "X-Requested-With": "XMLHttpRequest" }, handleAs:"text" }; dojo.xhrPost(cnf); } function _xhr_get_next(cmd, prm, cxt) { if (cmd != '') dojo.byId('v_cmd').value = cmd; if (prm != '') dojo.byId('v_prm').value = prm; if (cxt != '') dojo.byId('v_cxt').value = cxt; _xhr(); }