- e.onclick = function() {
- save_focus(e);
- var asp = e.getAttribute('aspect')
- if (asp && asp.indexOf('process') !== -1)
- JsHttpRequest.request(this, null, 60000);
- else
- JsHttpRequest.request(this);
- return false;
- }
- },
- 'button': function(e) {
- if (e.name) {
- var func = _validate[e.name];
- var old = e.onclick;
- if(func) {
- if (typeof old != 'function' || old == func) { // prevent multiply binding on ajax update
- e.onclick = func;
- } else {
- e.onclick = function() {
- if(func())
- { old(); return true;}
- else
- return false;
- }
+ e.onclick = function() {
+ if (validate(e)) {
+ save_focus(e);
+ var asp = e.getAttribute('aspect')
+ if (asp && asp.indexOf('process') !== -1)
+ JsHttpRequest.request(this, null, 60000);
+ else
+ JsHttpRequest.request(this);