michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: false michael@0: null michael@0: 0 michael@0: "." michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: if (this._valueEntered) { michael@0: var newval = this.inputField.value; michael@0: newval = newval.replace(this.decimalSymbol, "."); michael@0: this._validateValue(newval, false); michael@0: } michael@0: return this._value; michael@0: michael@0: michael@0: this._validateValue(val, false); michael@0: return val; michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: var min = this.getAttribute("min"); michael@0: return min ? Number(min) : 0; michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: var max = this.getAttribute("max"); michael@0: return max ? Number(max) : Infinity; michael@0: michael@0: michael@0: val) michael@0: this._validateValue(val, false); michael@0: return val; michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: var places = this.getAttribute("decimalplaces"); michael@0: return places ? Number(places) : 0; michael@0: michael@0: michael@0: if (typeof val == "number") { michael@0: this.setAttribute("decimalplaces", val); michael@0: this._validateValue(this.valueNumber, false); michael@0: } michael@0: return val; michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: var increment = this.getAttribute("increment"); michael@0: return increment ? Number(increment) : 1; michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: return this._validateValue(this.valueNumber - this.increment, true); michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: return this._validateValue(this.valueNumber + this.increment, true); michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: = this.max); michael@0: } michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: max) michael@0: aValue = (aIsIncDec && wrapAround ? min : max); michael@0: michael@0: var places = this.decimalPlaces; michael@0: aValue = (places == Infinity) ? "" + aValue : aValue.toFixed(places); michael@0: michael@0: this._valueEntered = false; michael@0: this._value = Number(aValue); michael@0: this.inputField.value = aValue.replace(/\./, this.decimalSymbol); michael@0: michael@0: if (!wrapAround) michael@0: this._enableDisableButtons(); michael@0: michael@0: return aValue; michael@0: ]]> michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: var evt = document.createEvent("Events"); michael@0: evt.initEvent("change", true, true); michael@0: this.dispatchEvent(evt); michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: this._valueEntered = true; michael@0: michael@0: michael@0: michael@0: 57) michael@0: event.preventDefault(); michael@0: } michael@0: ]]> michael@0: michael@0: michael@0: michael@0: this._modifyUp(); michael@0: michael@0: michael@0: michael@0: this._modifyDown(); michael@0: michael@0: michael@0: michael@0: this._modifyUp(); michael@0: michael@0: michael@0: michael@0: this._modifyDown(); michael@0: michael@0: michael@0: michael@0: if (event.originalTarget == this.inputField) { michael@0: var newval = this.inputField.value; michael@0: newval = newval.replace(this.decimalSymbol, "."); michael@0: this._validateValue(newval, false); michael@0: } michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: