var sname = '_'+s.name+'_update';
var update = document.getElementsByName(sname)[0];
if(update) {
- if (typeof changeVar === "function")
- changeVar();
JsHttpRequest.request(update);
}
}
}, 100);
return true;
}
+ return false;
},
e.onkeydown = function(ev) { // block unintentional page escape with 'history back' key pressed on buttons
ev = ev||window.event;
function(e) {
e.onclick = function() {
if (validate(e)) {
- if (typeof changeVar === "function")
- changeVar();
-
save_focus(e);
var asp = e.getAttribute('aspect')
if (asp && (asp.indexOf('process') !== -1))
return false;
}
},
- '.amount': function(e) {
- if(e.onblur==undefined) {
+ '.amount': function(e) {
+ if (e.onblur == undefined) {
+ e.setAttribute('_last_val', e.value);
e.onblur = function() {
var dec = this.getAttribute("dec");
- price_format(this.name, get_amount(this.name), dec);
+ var val = this.getAttribute('_last_val');
+ if (val != get_amount(this.name)) {
+ this.setAttribute('_last_val', get_amount(this.name));
+ price_format(this.name, get_amount(this.name), dec);
+ if (e.className.match(/\bactive\b/))
+ JsHttpRequest.request('_'+this.name+'_changed', this.form);
+ }
};
}
},