Bug #19442
closed
When inserting prices in tx_commerce the input is always transformed into NaN##
Added by Markus Bucher about 16 years ago.
Updated about 6 years ago.
Description
jsfunc.js seems to interpret prices incorrect.
Examples:
122.00 is transferred into "NaN00"
1888.12 is transferred into "NaN12"
0 is not transferred. Blank neither.
(issue imported from #M9524)
i confirm this bug!
(on common decimal fields!!!)
it seems the bug is in line 172 of jsfunc.evalfield.js
theVal=this.parseInt(this.noSpace(theVal))+TS.decimalSign+dec.substr(0,2);
it's this function call that returns the NaN00
is seems that that TS.decimalSign variable is undefined .. where does it come from?
yes the problem is that TS.decimalSign undefined...
is defined in jsfunc.tbe_editor.js
yes i found it...:
function typoSetup () {
this.passwordDummy = '********';
this.decimalSign = '.';
}
var TS = new typoSetup();
but checking the whole script running (via Firebug) TS.decimalSign is undefined when it is called jsfunc.evalfield.js
the bug happens either in FF 3 and Safari 3 (so it isn't another FF 3 quirk)
could it be it is because jsfunc.evalfield.js is loaded in the main page header, and jsfunc.tbe_editor.js in the sub sub iframe of the page?
yes, it is the same problem (the order of loading .js files and the TS object not istantiated)
- Status changed from Resolved to Closed
Also available in: Atom
PDF