Closed telvin closed 10 years ago
Hi, thanks for spotting that. I suppose I could make the change myself, but it'd be easier if you could make a Pull Request so I can just quickly try it out before merging.
As nobody else did it, I put it up as a pull request...
In the demo version https://01.org/html5webapps/online/scientific-calculator/, it works fine. But in the release version, some places are converted from javascript to jQuery syntax, there is bug.
Example: 1 + 2 = 3 [click clear AC] => 3 + 4 should = 7 Wrong: 1 + 2 =3 [click clear AC] => + 3 = malform syntax error
I fixed this line in calc.js $("#currentformula").html(Calculator.getMainEntry() + operator ); change it to $("#currentformula").html( $("#currentformula").html() + Calculator.getMainEntry() + operator );
Actually the old version is right, its here document.getElementById("currentformula").innerHTML += Calculator.getMainEntry(); document.getElementById("currentformula").innerHTML += operator;